Designing Concurrent Rate Limiters in Go
Token buckets in Go, HTTP middleware, per-client and per-tenant limits, and why production systems eventually need a distributed limiter backed by Redis.
Token buckets in Go, HTTP middleware, per-client and per-tenant limits, and why production systems eventually need a distributed limiter backed by Redis.
How one goroutine’s writes become visible to another: happens-before, mutexes vs channels, atomics, safe publication, and catching data races in practice.
Bounding concurrency with worker pools: bounded queues and backpressure, cancellation, error handling, graceful shutdown, and sizing the pool.
What happens after go f(): the G-M-P model, run queues, work stealing, blocking syscalls, preemption, GOMAXPROCS, and how to observe it all with runtime trac...
Goroutines and channels are only the start. Concurrency vs parallelism, the scheduler, channels vs shared memory and the memory model: what it takes to build...
How 2PC coordinates atomic commits across nodes, a working Go implementation, the failure modes that make it a blocking protocol, and when it is the right to...
Scaling decisions start with finding the bottleneck, not choosing a pattern. When a bigger machine is the right answer, what it takes to make a service horiz...
How Raft keeps a replicated log consistent: terms, randomized elections, the log-matching check and the commit rule, with Go code for each, plus what actuall...
The real difference between SOA and microservices isn’t service size. It’s where the logic lives and who owns the data. A side-by-side comparison, the hidden...
Why getting a handful of servers to agree on one value is one of the hardest problems in distributed systems: failure and timing models, FLP impossibility, w...