Context, Timeout, and Cancellation in Go: A Production Reliability Guide
Practical patterns for context propagation, timeout budgeting, cancellation handling, and graceful shutdown in Go services.
8 posts
Practical patterns for context propagation, timeout budgeting, cancellation handling, and graceful shutdown in Go services.
Production-oriented golang rate limiting with Redis — token bucket and sliding window using Lua scripts, atomic updates, and operational tips.
gRPC and REST in microservices: protobuf, HTTP/2, browser constraints, and Go examples — complements our Go vs Node.js service comparison.
Sign and verify JWTs in Go; short-lived access tokens, refresh rotation, HttpOnly cookies, and common pitfalls.
Subcommands with Cobra, flag parsing, stdin/stdout, exit codes, cross-compilation, and testing — a practical guide to production-grade Go CLI development.
Layered integration testing with sqlmock, Testcontainers, httptest, interface-based fake brokers, and external API mocks — architecture diagrams and production-style Go examples.
Learn how to diagnose CPU hotspots and memory pressure in Go services with pprof, flame graphs, and benchmark-driven profiling.
Learn core goroutine patterns with practical examples: worker pool, fan-out/fan-in, pipeline, cancellation, and concurrency limits.