Posts on backend engineering — the language-agnostic patterns and decisions that define a great backend. API design, caching, queues, observability, system design tradeoffs, and the lessons that apply whether you write Python, Go, or anything else.
Practical auth choice: sessions for first-party web (default), JWTs for cross-domain APIs / mobile, hybrid for the real world.
Practical API design: REST conventions, error responses, cursor pagination, partial responses, idempotency keys, and what separates good from frustrating APIs.
Practical streaming protocol selection: SSE for one-way, WebSocket for bidi, gRPC for typed RPC, NDJSON for JSON streams. Comparison and production patterns.
Server Actions are great for first-party UIs. Traditional APIs win for third parties, multiple clients, and contracts. Honest comparison and patterns.
Practical multi-tenancy: row-level (cheapest), schema-per-tenant (isolation), DB-per-tenant (compliance). RLS, query patterns, and operational realities.
Practical ‘just use Postgres’ patterns: queues with SKIP LOCKED, caching with UNLOGGED tables, FTS, pgvector, JSONB, time-series, and when to actually graduate.
gRPC working set: proto evolution, unary vs streaming RPCs, deadlines, retries, interceptors, observability, and connect-go for browser-friendly gRPC.
Practical DB migrations: expand-contract, blue/green, pg_repack for big tables, schema deploys, and rollback strategies that work.
Practical API versioning: URL paths, headers, GraphQL deprecations, evolution rules, and how to keep clients happy across years of changes.
Practical distributed transactions: why 2PC rarely fits, sagas (orchestration vs choreography), outbox + CDC, idempotency, and the operational tradeoffs.