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.
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.
A timeout is not a failure. Ten real ways idempotency keys break in payment systems — lost gateway responses, two tabs, racing retries, Redis evictions, expired keys, duplicate webhooks — with the fix for each, ten…
You add 24 more workers to fix Kafka lag — and they all sit idle. Meanwhile one huge message is stuck at the front of a partition, and nothing behind it moves.
Not a "what is Lambda" post. A deep dive into how Lambda actually works: Firecracker microVMs and the Worker/placement fleet, how invocations get routed on the warm vs cold path, and what the INIT phase really does (and…
“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.
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.
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.
The bell curve taught you the average is a fair summary and outliers are rare. In software both halves are false: latencies, key popularity, file sizes and follower counts are heavy-tailed power laws where the outliers…
"Stamp each write with the current time and keep the latest" feels obvious — and it silently deletes data, because two machines can never agree on what time it is.
Most engineers think a leader election "picks the best node." It doesn't — it gets every node to agree on the same node, and agreement under failure is consensus.
Every distributed system contains a quiet subsystem that decides which peers are still alive — and "send a ping, no reply, mark it dead" is wrong in a few interesting ways.
A plain-language walkthrough of Pat Helland's 2007 classic "Life beyond Distributed Transactions" — the paper that named the patterns every large system already uses.
When you press Enter in Slack, the message does not travel over the WebSocket your client is holding open — it goes out as a separate HTTPS POST to chat.
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.
Why “our queue guarantees exactly-once” is almost always a lie once your flow crosses a component boundary: Kafka EOS scope, ack-after-process, unique constraints, SQS FIFO, DB transactions with SMTP, retries without…
A senior-engineer walkthrough of the whole cache stack: CPU L1/L2/L3, TLB, OS page cache, DB buffer pool, in-process LRU (Caffeine), distributed cache (Redis/Memcached), HTTP cache + ETags, CDN edge, browser, DNS, reverse proxies, query plan cache.
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).
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…
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.
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 —…
Every type of scaling explained simply — horizontal, vertical, reactive, predictive, scheduled. Why HPA and ASG break on Dream11 during an IPL final, flash sales, and push notifications.
When the Garbage Collector pauses, every thread freezes — zero requests, zero responses. This post explains how GC actually works: the heap, mark-and-sweep, minor vs major collections, Stop-the-World pauses, and what…
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.
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.
A user had access to 1 lakh devices across MongoDB, ClickHouse, and Elasticsearch. We tried seven approaches. All broke. The full journey — dead ends, edge cases, and what production systems actually do.