Idempotency Patterns: Building Retry-Safe Distributed Systems
Why exactly-once is a myth, and how idempotency keys, database constraints, and the outbox pattern make retries safe in Go and Java.
Production-grade engineering for people who ship backends at scale. Distributed systems, database internals, and the trade-offs you only learn in on-call.
Why exactly-once is a myth, and how idempotency keys, database constraints, and the outbox pattern make retries safe in Go and Java.
Six reads that show what the rest of the library looks like — start here.
From 5-second startup to 50ms. The Java migration that changes K8s scaling math, with every production gotcha and a reproducible benchmark.
ReadWire thousands of API endpoints to an LLM agent without blowing the context window. Code Mode pattern + full Go implementation, security flow visualised.
ReadSame API in Spring Boot and Gin. Identical load tests on Fargate, real numbers on throughput, latency, GC pauses, and a methodology you can reproduce.
ReadWhy every scalable cache, database, and load balancer ends up here. Karger's derivation, Cassandra vnodes, and the rendezvous-hashing alternative.
ReadThe error-budget framework that turns reliability arguments into data. Multi-window burn-rate alerting, grounded in the SRE Book.
ReadWhy most RAG prototypes fail in production. Chunking, embedding versioning (1536-dim default + Matryoshka), pgvector tuning, eval pipeline.
ReadGo context.Context: constructors, cancellation, deadlines, request values, and five goroutine leak patterns in production.
Kafka producer configuration: acks, idempotence, batching, compression, and the tradeoffs that matter for throughput and durability.
Postgres EXPLAIN plans: node types, cost interpretation, and six patterns that kill query performance on large datasets.
2,500 API endpoints in one MCP server without blowing context windows. The Code Mode pattern uses search + execute to cut token cost by 1,000x.
AI agents calling tools via MCP create new attack surfaces: prompt injection through tool responses, credential leakage, and unauthorized execution.
Adding one cache server shouldn't invalidate every key. Consistent hashing with virtual nodes and bounded loads — full Go and Java implementations.
Probabilistic drop rate limiting: uncoordinated enforcement bypassing Redis for 1M+ RPS with zero coordination overhead.
Compare pgvector, Pinecone, Weaviate, Qdrant, Milvus, and Chroma on performance, cost, and operational fit with real code and benchmarks.
Handle unpredictable JSON in Go: map[string]any, json.RawMessage, type switches, and defensive patterns for shifting schemas.