Tutorials, stack comparisons, tool reviews, and productivity tips — code that ships.
A 4 GB table somehow uses 80 GB on disk and queries are slow. Autovacuum is on, autovacuum is running, autovacuum is not actually freeing space, and the reason is one setting most teams have never heard of. Here is what bloat is, why long-running transactions kill VACUUM, and the four queries you need to run before reaching for `pg_repack`.
Most teams configure liveness and readiness probes identically and wonder why a slow database makes Kubernetes restart their pods in a death spiral. Here is what each probe is actually for, the right endpoint shape for each, and the four-line config that turns an outage into a non-event.
Server-sent events are a 1.5KB drop-in for streaming notifications, progress, and live updates, and they work through every proxy and CDN that already handles HTTP. WebSockets are the right tool for genuine bidirectional, low-latency traffic. Here is the decision tree and the implementation patterns for each.
The “sliding window” rate limiter every tutorial shows you breaks at scale. Token bucket is the algorithm real APIs use because it allows bursts without exceeding the average rate. Here is a 30-line Lua-on-Redis implementation, the failure modes to test for, and the headers you should be returning to clients.
Flipping `strict: true` on a 200-file TypeScript codebase produces 8000 errors and a team revolt. The right migration is incremental, file-by-file, with the seven flags enabled in the right order. Here is the plan that has worked on three real codebases.
Whenever your code does “write to the database, then publish to Kafka,” there is a window where one succeeds and the other does not. The outbox pattern closes that window with a single extra table and 60 lines of dispatcher code. Here is how it works and why every alternative ends up reinventing it.
Most load tests slam one endpoint with a constant rate of requests and report a percentile. That graph means almost nothing. Real bugs live in ramp-up, soak, and spike scenarios. Here are the k6 scripts for each, the metric to read, and why the constant-load test you ran last quarter missed the regression.
In a multi-tenant SaaS, every query needs a `WHERE tenant_id = ?` and one missing one is a data breach. RLS moves that filter into the database where you cannot forget it. Here is the pattern that works in practice, including the connection-pool gotcha that breaks it.
The rebase-vs-merge debate is a proxy for a more useful question: what should the history of `main` look like a year from now? Here is the policy that answers it, applied to feature branches, long-lived branches, and the cases where you really should preserve the merge.
Distributed tracing only earns its keep at 3 a.m., when one slow request is hiding in a microservice call graph. Here is the OpenTelemetry setup for Node.js that auto-instruments the boring stuff, lets you add the span attributes that matter, and connects to any backend you point it at.