Channel Semaphore vs x/sync/semaphore: It's Not About Speed
Benchmarking chan struct{} against x/sync/semaphore shows the performance folklore is wrong; the differences that matter are semantic.
Read on MediumBlog
Distributed systems, cloud cost, performance, security platforms, and the engineering choices that make infrastructure easier to operate. Most essays are published on Medium.
Reading guide: Go in Production (11 posts).
Benchmarking 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 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 MediumRetries are one of the easiest resilience patterns to add and one of the easiest to get wrong, and a badly tuned retry can turn a blip into an outage.
Read on MediumA look at why caches are time-limited promises rather than sources of truth, and how explicit invalidation and failure handling keep them honest.
Read on MediumA case for simple, predictable caching strategies that degrade gracefully over clever optimizations that are hard to reason about.
Read on MediumA practical look at why deterministic build outputs are essential for reliable caching, and the common sources of nondeterminism to watch for.
Read on MediumA practical introduction to remote execution, modeling builds as DAGs of deterministic actions that can be cached and distributed across machines.
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 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 MediumA practical guide to enabling pprof, collecting CPU and heap profiles, reading flame graphs, and debugging Go services under real load.
Read on MediumA practical guide to using context.Context as part of service design, cancellation, deadlines, and shutdown behavior in Go.
Read on MediumA short note on keeping Go interfaces small, behavior-focused, and easier to test and evolve.
Read on MediumA practical look at worker-pool mistakes around cancellation, channel ownership, and shutdown paths.
Read on Medium