Query Optimization18 min read
"Push It All on the Database" — The Lie That Works Until It Doesn't
Every team ships with the same lie: throw everything on the database and it'll handle correctness. Works at 50 writes/sec.
39 long-form articles on production engineering — how real systems fail, why, and what actually fixed them.
18 articles matching “Database”
Query Optimization18 min read
Every team ships with the same lie: throw everything on the database and it'll handle correctness. Works at 50 writes/sec.
Architecture Decisions20 min read
Every process you run will be told to stop — the only question is whether it gets a request it can act on or a bullet it never sees coming.
Query Optimization13 min read
“We sold 3 tickets but only had 1.” The code is inside a transaction, looks right, works a hundred times locally, and only breaks in production under load.
Query Optimization13 min read
Every list endpoint ends in LIMIT 20 OFFSET ?. It has an index, page one returns in 8ms, and it passes review — then one Tuesday page 4,000 takes four seconds and a nightly export job stops finishing.
Query Optimization15 min read
We're trained to demand our data structures be correct — so here's one that's wrong on purpose, and runs inside Cassandra, RocksDB, Bigtable, most CDNs, and your browser's malware check.
Production Incidents18 min read
It's 3 AM. Inserts are failing with 'Duplicate entry 2147483647' — but you never inserted a duplicate. Welcome to one of MySQL's most quietly famous outages.
Picking the Right DB15 min read
A senior-engineer walkthrough of how Redis really handles TTLs. Why TTL=0 doesn't free memory. The two strategies — lazy (on-access) and active (the random-sample-and-25%-threshold sampler).
Picking the Right DB22 min read
A senior-engineer walkthrough of Log-Structured Merge Trees: MemTable + WAL durability, SSTable layout with sparse index and bloom filters, the L0→Ln level hierarchy, leveled vs tiered vs FIFO compaction, the three…
Architecture Decisions20 min read
SVG-backed walkthrough: ring hotspots, successor overload when a node dies, and two ring generations during deploy.
Schema Design14 min read
A plain-English walkthrough: how B-tree inserts actually work, what a page split costs, why random UUID v4 keys bloat the index by 2× and blow the buffer pool.
Performance14 min read
Why your connection pool config is probably wrong — and how to fix it with Little's Law, Kingman's Formula, and the process-to-core ratio.
AI Agents18 min read
The Refund Agent will not refund until the carrier confirms the return. The Shipping Agent will not create a return label until the refund is approved.
Production Incidents45 min read
A payment commits, the API returns 200, the rack loses power, and after recovery the row does not exist. Before blaming the database, six questions have to be separated.
Architecture Decisions20 min read
A beginner-friendly walkthrough: what “concurrent” means, what the C10K and C10M problems actually are, how the industry usually fixes them (event loops vs whole-system design), and what still goes wrong in production —…
Schema Design12 min read
Why DELETE is the most expensive DML operation in a relational database — and why a simple UPDATE SET deleted_at = NOW() is 4-8x faster under concurrent load.
Query Optimization18 min read
A deep-dive into non-SARGable SQL with B-tree diagrams, real EXPLAIN output, and the exact rewrites — told through a gaming dashboard that went from 4,200ms to 2ms without touching the schema.
Query Optimization13 min read
How similarity search works under the hood — and why naive brute-force collapses at scale.
Query Optimization5 min read
What happens when your index outgrows your data — and how we fixed it without downtime in production.