Go Singleflight Deep Dive: Preventing Cache Stampede with One Line of Code
In high-concurrency scenarios, cache stampede can crush your database. Singleflight solves this with an elegantly simple design.
In high-concurrency scenarios, cache stampede can crush your database. Singleflight solves this with an elegantly simple design.
Most people install Nginx via package managers, but compiling from source truly reveals its module mechanism. This post uses FastDFS module integration as an example to analyze Nginx’s build system and modular architecture.
One night at 2 AM, Kafka message lag alerts fired. Investigation revealed a Zookeeper cluster split-brain — two nodes both thought they were the Leader. This post documents the full debugging and recovery process.
Microservices isn’t just about splitting up a monolith. This post documents 5 real pitfalls I hit in Go microservices projects, and how to avoid them.
The best way to learn filesystems is to write one yourself. This post uses FUSE + Go to implement an in-memory filesystem with basic read/write operations, deep-diving into core concepts like inode and block.
Textbook LRU uses a doubly-linked list + HashMap. But why does Redis use “approximate LRU”? This post dives into Redis source code to analyze the engineering trade-offs behind different eviction strategies.