
Zero-Downtime Database Schema Migrations
One ALTER TABLE locked a production table for minutes. Here's the expand-contract pattern, batched backfills, and CREATE INDEX CONCURRENTLY done right.
Tag

One ALTER TABLE locked a production table for minutes. Here's the expand-contract pattern, batched backfills, and CREATE INDEX CONCURRENTLY done right.

A downstream dependency slowed down for 90 seconds — our retry logic took it down completely. Here's what jittered backoff actually prevents, and why.

Rate limiting isn't one algorithm choice — it's three decisions: where you enforce it, what key you use, and only then which algorithm to run.

A payment request timed out, the mobile app retried automatically, and the customer got charged twice. Here's how idempotency keys and UPSERT prevent that.

Field notes on getting reliable JSON from an LLM: schema modes vs tool-calling, Zod/Pydantic validation at the boundary, and the failure modes that still bite.

Most agent failures on long tasks aren't model failures — they're context failures. Seven patterns, a context budget, and a checklist to fix an existing agent.

A coding agent's scratchpad fills, context evicts, and the one decision that mattered vanishes. The memory taxonomy that prevents this, plus a decision tree.

A practitioner's guide to zero downtime deployment in 2026: blue-green vs canary vs rolling, health checks, connection draining, and safe database migrations.