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.
10 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.
Smaller container images for Go and Node: multi-stage Dockerfiles, distroless bases, Alpine caveats, and layer caching.
Manage DB connections in production: PgBouncer transaction pooling, Go database/sql settings, and Node.js pg pool tuning.
Subcommands with Cobra, flag parsing, stdin/stdout, exit codes, cross-compilation, and testing — a practical guide to production-grade Go CLI development.
A detailed comparison of Go and Node.js across performance, developer productivity, operations, and service-type fit, with a practical framework for architecture decisions.
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.