Backend · deep dives
The long form.
The chapters give you the map. These go deep: full case studies of real systems (how they handle India-sized scale, what breaks first) alongside core-topic deep dives that take one hard thing, like Postgres internals or authentication, all the way down. Read one, then try to redraw it from memory.
Foundations
Streaming & real-time
- Streaminghard24 min read
Live Cricket Streaming at JioHotstar Scale
How do you stream one cricket match to 60 million people at once without melting? A full walk-through of live video at India-sized scale: encoding ladders, HLS segments, multi-CDN, adaptive bitrate, the thundering herd at every wicket, and the live concurrency counter.
- Messaginghard20 min read
Building Chat at WhatsApp Scale
Billions of messages a day, delivered in order, exactly once as far as the user can tell, to phones that are offline half the time. A deep dive into connection servers, message delivery guarantees, the ticks, presence, group fanout, and push notifications.
Data & consistency
- Inventory & Bookinghard20 min read
Surviving the IRCTC Tatkal Rush
At 10am, millions of people fight over a few thousand train seats in the same 60 seconds. A deep dive into limited-inventory booking under extreme contention: holds and locks, never overselling, idempotent payments, and fair queueing.
- Feedshard19 min read
A Social Feed at Instagram Scale
When you open Instagram or Twitter, where does that feed come from, and why is it so hard? A deep dive into fanout-on-write vs fanout-on-read, the celebrity problem, the hybrid model everyone actually uses, ranking, and timeline storage.
- Paymentshard19 min read
A Payments Ledger for UPI-Scale Money Movement
Money is the one place 'eventually consistent' isn't good enough. A deep dive into double-entry ledgers, why you never edit a balance, idempotency on every rupee, the two-phase money movement problem, and reconciliation.
Infrastructure & platform
Databases, in depth
- Databaseshard19 min read
How Postgres Stores and Finds Your Data
Open the box. Heap files and pages, the tuple, MVCC and why updates are really inserts, the WAL, vacuum and bloat, and how a B-tree index turns a full-table scan into three pointer hops. The mental model that makes slow queries obvious.
- Databaseshard17 min read
Reading a Query Plan Like a Senior
EXPLAIN ANALYZE is the single highest-leverage skill in backend work, and almost nobody teaches it properly. Scan types, join types, the estimate-vs-actual gap that reveals bad plans, and a repeatable workflow for turning a slow query fast.
- Databaseshard18 min read
Transactions, Isolation, and the Bugs They Prevent
ACID is easy to recite and hard to use. A deep dive into what isolation levels actually buy you: the concrete anomalies (dirty reads, lost updates, write skew) each one prevents, how MVCC snapshots work, pessimistic vs optimistic locking, and how to stop deadlocks.
APIs, in depth
- API Designhard18 min read
Authentication, From the Protocol Up
Sessions vs JWTs is not a style choice, it's a trade between revocability and statelessness. A deep dive into how each really works, the access/refresh token dance, where to store tokens, the OAuth + PKCE flow, and the attacks each decision invites.
- API Designmedium16 min read
Idempotency and Exactly-Once That Actually Works
Networks fail, clients retry, queues redeliver, and somewhere a customer gets charged twice. A deep dive into idempotency keys, why exactly-once delivery is a myth, the state machine that makes retries safe, and how to apply it across APIs, webhooks, and background jobs.
- API Designmedium14 min read
Pagination That Survives Real Data
OFFSET feels fine in development and falls apart in production. A deep dive into why offset pagination gets slow and shows duplicates, how keyset (cursor) pagination fixes both, building stable cursors, and the total-count problem.
- API Designhard18 min read
Authorization, Past the If-Statement
Authentication tells you who someone is; authorization decides what they may do, and that's where the scary bugs live. A deep dive into RBAC vs ABAC vs ReBAC, why scattered if-checks rot, centralizing the decision, multi-tenant row isolation, and the confused-deputy bugs that leak other people's data.