Blog

Notes on data structures & algorithms, system design, and things I learn along the way.

Learning DSA? Follow the structured path — ordered articles from recursion to dynamic programming.→
October 18, 2026Blue-Green and Canary Deployments: Shipping Without Holding Your Breath3 min read

How to release new versions with minimal risk: rolling updates, blue-green switches, canaries that expose a change to a small share of real traffic first, automated rollback on bad metrics, feature flags that separate deploy from release, and the database migrations that make rollback possible.

#System Design
October 18, 2026System Design Case Study: A Ride-Hailing Service11 min read

How an app like Uber or Ola matches riders with drivers: a high-write location service indexed by geo cell, matching ranked by ETA rather than distance, a trip state machine, live tracking over WebSockets, surge pricing, and the consistency questions behind 'two riders, one driver'.

#System Design
October 18, 2026System Design Case Study: A Web Crawler11 min read

Designing a crawler that fetches billions of pages politely: the URL frontier with per-host queues, robots.txt and rate limits, DNS caching, de-duplicating URLs with Bloom filters and content with fingerprints, avoiding crawler traps, freshness scheduling, and scaling it all across machines.

#System Design
October 18, 2026Gossip Protocols and Failure Detection3 min read

How a cluster of hundreds of nodes agrees on who's alive without a central coordinator: each node periodically tells a random peer what it knows, information spreads in about log N rounds, and heartbeats riding along let everyone detect failures. With SWIM, phi accrual detectors, and the trade-offs.

#System Design
October 18, 2026Quorum Reads and Writes: R + W > N3 min read

How Dynamo-style databases stay available with replicas that disagree. Choosing how many replicas must confirm a write (W) and answer a read (R) out of N, why R + W > N makes reads see the latest write, and the machinery around it: versions, read repair, hinted handoff and sloppy quorums.

#System Design
October 17, 2026Cache Stampedes: When One Expired Key Takes Down the Database3 min read

A hot cache key expires, thousands of requests miss at once, and all of them run the same expensive query. How cache stampedes happen, and the fixes: request coalescing, a rebuild lock, serving stale data while revalidating, probabilistic early expiration, and TTL jitter.

#System Design
October 17, 2026Inverted Indexes: How Full-Text Search Works3 min read

Why LIKE '%term%' doesn't scale, and what search engines do instead. Tokenising and normalising text, postings lists with positions, fast AND, OR and phrase queries, ranking with BM25, and how Lucene-style engines keep the index updated with immutable segments.

#System Design
October 16, 2026Connection Pooling: Why Your App Shouldn't Open a Connection per Request3 min read

Opening a database connection costs round trips, TLS and authentication, and every open connection costs the database memory. How a pool reuses a few connections across many requests, how to size it, what happens when it's exhausted, and why serverless and many replicas need an external pooler like PgBouncer.

#System Design
October 16, 2026System Design Case Study: A Chat System11 min read

Designing one-to-one and group messaging like WhatsApp or Slack: persistent connections, presence, message ordering with per-conversation sequence numbers, delivery receipts, offline sync, media, and fan-out for groups. With the trade-offs at each step.

#System Design
October 16, 2026System Design Case Study: A News Feed10 min read

How a social feed shows each person the latest posts from everyone they follow: fan-out on write vs. fan-out on read, the celebrity problem and the hybrid that solves it, feed storage, hydration, ranking, and pagination — with the numbers behind each choice.

#System Design

47 posts tagged System Design · page 1 of 5