Blue-Green vs Canary vs Rolling Deployments
How the three common deployment strategies differ, when to use each one, and what health checks, traffic shifting, rollback plans, and database compatibility need to be in place first.
Tiny explainers grouped by topic. Spend less time Googling, more time building.
How the three common deployment strategies differ, when to use each one, and what health checks, traffic shifting, rollback plans, and database compatibility need to be in place first.
How to make logs useful under real traffic: correlation IDs, JSON event shape, sampling rules, and PII redaction that does not depend on everyone remembering.
Commands say 'do X', events say 'X happened'. Use sagas (orchestration or choreography) for long‑running, cross‑service workflows with compensations, idempotency, and reliable messaging.
The 80% you actually need: Pods, Deployments, Services, Ingress/Gateway, Requests/Limits, Probes, Config & Secrets, HPA, storage, and the kubectl commands you’ll use daily.
Fixed/sliding windows, token & leaky buckets, GCRA, and real-world implementations (Redis, NGINX, Envoy). Covers headers, bursts, backoff, multi‑DC, and tuning.
Real-world settings and copy‑paste snippets for circuit breakers (closed/open/half‑open) and bulkheads (bounded concurrency/queues). Works with HTTP, gRPC, and message calls.
Pragmatic ratios, what to test where, and how to keep CI under 10 minutes: unit vs integration vs E2E, contract & component tests, data management, and flake-killers.
Design for duplicates and reordering. Use idempotency, an inbox/outbox, and per‑key ordering to get effectively‑once processing in real systems.
Change schemas safely with backward‑compatible steps, dual writes, background backfills, and rolling deploys. Postgres‑flavored, but patterns apply to MySQL and friends.
Design request deadlines, hop timeouts, and idempotent retries with jitter so you protect upstreams, tame tail latency, and avoid cascading failures.
Which status codes to use, how to shape errors consistently, and what to log so clients get clear signals and you get useful telemetry.
A quick, practical explainer of idempotency: what it means, how HTTP methods relate, and how to implement idempotent POSTs with idempotency keys to make retries safe.