Posts by Year

2024

Designing Concurrent Rate Limiters in Go

10 minute read

Token buckets in Go, HTTP middleware, per-client and per-tenant limits, and why production systems eventually need a distributed limiter backed by Redis.

The Go Memory Model

8 minute read

How one goroutine’s writes become visible to another: happens-before, mutexes vs channels, atomics, safe publication, and catching data races in practice.

Understanding Go Scheduler

8 minute read

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...

Back to Top ↑

2023

Two Phase Commit Protocol

4 minute read

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...

Back to Top ↑

2022

Back to Top ↑