Three Go Concurrency Mistakes I See in Almost Every Worker Pool
A practical look at worker-pool mistakes around cancellation, channel ownership, and shutdown paths.
Read on MediumReading guide
Essays on writing Go services that hold up under load, cancel cleanly, and shut down without dropping requests. Most start from a bug that looked correct in code review. Grouped by topic, in a sensible reading order.
Worker pools, bounding concurrency, and making sure goroutines actually stop.
A practical look at worker-pool mistakes around cancellation, channel ownership, and shutdown paths.
Read on MediumBenchmarking chan struct{} against x/sync/semaphore shows the performance folklore is wrong; the differences that matter are semantic.
Read on Mediumerrgroup.WithContext is a tiny API that keeps producing the same bugs. A look at its documented cancellation semantics, which are easy to assume rather than read.
Read on MediumWhy a green goleak test suite can coexist with goroutine counts that climb all week in production, and the narrower question goleak actually answers.
Read on MediumDeadlines, cancellation, and deploys that don't spike 502s.
A practical guide to using context.Context as part of service design, cancellation, deadlines, and shutdown behavior in Go.
Read on Mediumsrv.Shutdown can return nil while every deploy still spikes 502s. What Go's Shutdown actually promises, and what it leaves for you to handle.
Read on MediumFinding where the time goes, and running well inside containers.
A practical guide to enabling pprof, collecting CPU and heap profiles, reading flame graphs, and debugging Go services under real load.
Read on MediumA practical look at Go resource management inside containers, the Go 1.25 improvements, and the gaps engineers still need to account for.
Read on MediumSmall habits that make Go code harder to misuse.
A short note on keeping Go interfaces small, behavior-focused, and easier to test and evolve.
Read on MediumA look at a common Go bug from mixing make() with a non-zero length and append, and the makezero linter that catches it.
Read on MediumA practical note on making Go constants explicit, readable, and harder to misuse by naming both the type and the unit.
Read on Medium