— Writing —
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). The hz parameter, active-expire-effort, lazyfree-lazy-expire. DEL vs UNLINK and why big-key expiry used to pause the event loop. How replicas handle expiration via the replication stream. maxmemory + eviction policies as the actual safety net. The metrics from INFO that tell you when the sampler is falling behind.
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 amplifications (write/read/space), bloom filter math, and the RocksDB and Cassandra tuning knobs that actually matter. Why RocksDB, LevelDB, Cassandra, HBase, ScyllaDB, ClickHouse and TiKV all picked it — and when you should not.
Every team ships with the same lie: throw everything on the database and it'll handle correctness. Works at 50 writes/sec. At 5,000 writes/sec, every FK is a lock queue, every cascade synchronously deletes thousands, fsync becomes the clock. Why staging never catches it, ten places where the bill shows up, the cost curve of a hot FK, why cascades are dangerous, how to diagnose your bottleneck, and the enforcer+checker pattern senior teams use to move constraints off the database without losing correctness.
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. For each ID — UUID v4, Snowflake, UUID v7, AUTO_INCREMENT — what it is, why people pick it, what breaks. Real MySQL benchmark at 10M rows, Postgres differences, and a dual-write migration that works.
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. Includes a real-world banking system that had 640 connections but only needed 5.
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. With InnoDB internals, B-tree diagrams, and benchmark numbers.
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.
How similarity search works under the hood — and why naive brute-force collapses at scale.
What happens when your index outgrows your data — and how we fixed it without downtime in production.