Writing
Notes from the trenches. Mostly backend, sometimes architecture, occasionally me arguing with myself.
Distributed Transactions Without Nightmares: A Practical Guide to Sagas
Two-phase commit is a trap. Here's how the saga pattern lets you coordinate multi-service workflows with graceful rollbacks, without coupling your services to each other's availability.
PostgreSQL Connection Pooling: Why PgBouncer Might Not Be What You Think
Session mode, transaction mode, statement mode — most teams pick the wrong one. A deep dive into connection lifecycle, prepared statements, and where PgBouncer actually helps versus where it introduces subtle bugs.
Go Context Patterns That Actually Scale
Context.WithTimeout and context.WithCancel are just the beginning. Patterns for propagating metadata, tracing spans, and graceful shutdown that I've used in production systems processing millions of requests.
Exactly-Once Semantics in Kafka: Reality Check
Kafka's exactly-once semantics are real — but the guarantees are narrower than most people realize. What it covers, what it doesn't, and what idempotent consumers look like in practice.
URL vs Header vs Content-Type API Versioning: An Engineer's Take
After migrating three APIs through major version changes, I have opinions. Spoiler: it depends less on the mechanism and more on your deployment model and client control.
Redis Beyond Caching: Patterns I Use Every Week
Rate limiting with sliding windows, distributed locks with Redlock, pub/sub for lightweight event fan-out, and bloom filters for cheap existence checks. Real usage patterns with Lua script examples.