~learn.
?
← preplectures · 184 · 55 h 14 min

Watch the whole design.

Animated, narrated lectures that walk through each lesson and side quest: the idea, where the obvious design breaks, the real one, and what to say in the interview. Each one links back to what it builds on, stops for quick checkpoints, and lets you ask the AI about any moment.

or listen to them as a podcast →read the guide →
your progress…

Week 0 · Foundations8 lectures · 159 min

  1. #1 · W00 · PART 1Beginner16 min
    System Design FundamentalsSystem design fundamentals: where do you even start?The first lecture of the course: what system design is, HLD vs LLD on a URL shortener, the four-step interview framework, functional vs non-functional requirements (nines, percentiles), the diagrams you'll draw, and sync vs async communication.4 checkpoints · 28 chapters
  2. #2 · W00 · PART 2Beginner19 min
    Infrastructure Building BlocksInfrastructure building blocks: what's inside the boxesThe pieces every design is made of: CDNs and Cache-Control, load balancers and health checks, L4 vs L7, DNS resolution and routing, stateless servers, monolith vs microservices, databases, cache-aside, object storage, and queues vs events.5 checkpoints · 33 chapters
  3. #3 · W00 · PART 3Beginner16 min
    Back-of-the-Envelope EstimationBack-of-the-envelope estimation: size it on a napkinThe numbers to carry in your head (powers of two, seconds in a day, latency, data sizes, throughput) and the four estimates, worked end to end for a Twitter-like service: traffic, storage, bandwidth and servers, plus how to present them.5 checkpoints · 29 chapters
  4. #4 · W00 · PART 4Beginner19 min
    Networking Fundamentals for System DesignNetworking fundamentals: what happens on the wireWhat hides inside “the client sends a request”: the TCP/IP layers, IPs and subnets, TCP's handshake, flow control and head-of-line blocking, port exhaustion, UDP, HTTP/1.1 to HTTP/3, WebSocket and SSE, TLS, latency's four parts, and NAT.5 checkpoints · 34 chapters
  5. #5 · W00 · PART 5Beginner18 min
    Operating System Concepts for System DesignOperating systems: inside the serverWhat the OS does under “the server handles 10,000 requests a second”: processes and threads, races and deadlocks, context switches, virtual memory and page faults, the cache hierarchy, blocking vs epoll event loops, fsync and the WAL, file descriptors and containers.5 checkpoints · 31 chapters
  6. #6 · W00 · PART 6Beginner23 min
    System Design Terminology & TheoryTerminology and theory: the words, and the reasoningThe vocabulary every later week uses, with the reasoning behind it: CAP and PACELC, ACID, isolation levels and BASE, consistency models, scaling, sharding and consistent hashing, replication and quorums, indexes and LSM trees, caching, queues vs streams, delivery guarantees, sagas, failure handling and error budgets.5 checkpoints · 34 chapters
  7. #7 · W00 · PART 7Beginner24 min
    API Design for System DesignAPI design: the contract that outlives the codeDesigning the API contract for system design: resources and standard methods, safe and idempotent promises, ETags against lost updates, status codes, offset vs keyset pagination with opaque tokens, sizing a list endpoint, backward-compatible changes and versioning, problem-details errors, idempotency keys, rate-limit headers, 202 and long-running operations, and choosing REST, gRPC or GraphQL by caller.5 checkpoints · 34 chapters
  8. #8 · W00 · PART 8Beginner24 min
    Databases in DepthDatabases in depth: what one server does insideSingle-node database internals for system design: pages, the buffer pool and the write-ahead log, group commit, B-trees vs LSM-trees and their amplification, why the primary key decides the working set, clustered vs heap tables, composite and covering indexes, reading EXPLAIN, lost updates and write skew, PostgreSQL vs InnoDB isolation, MVCC with vacuum and purge, pessimistic and optimistic locking, choosing a store, and generating IDs.4 checkpoints · 34 chapters

Week 1 · Data at Scale7 lectures · 121 min

  1. #9 · W01 · PREVIEWIntermediate7 min
    Data at Scale PreviewWeek 1 Preview: where does the data live?Week 1 turns you from someone who uses databases into someone who designs storage: partitioning, replication, consistency, hot keys and consistent hashing, practised on a URL shortener, a distributed rate limiter and a session store.2 checkpoints · 14 chapters
  2. #10 · W01 · DAY 01Intermediate20 min
    Partitioning Deep-DivePartitioning: how do you split data across machines?Why one database hits a ceiling, how hash, range and directory partitioning each break, why modulo resharding moves almost everything while consistent hashing moves one arc, and how to partition a URL shortener that survives a viral link.5 checkpoints · 33 chapters
  3. #11 · W01 · DAY 02Intermediate19 min
    Replication Trade-offsReplication: what do you trade for copies of data?Why we replicate, how leader-follower, multi-leader and leaderless replication each break, the anomalies replication lag causes, and how to give the URL shortener read replicas without serving a 404 for a link that exists, or two primaries after a network split.5 checkpoints · 33 chapters
  4. #12 · W01 · DAY 03Intermediate18 min
    Rate Limiting at ScaleRate limiting at scale: over-allow or under-allow?The five rate limiting algorithms and the boundary bug that separates them, why 50 servers each counting alone let 10 times the limit through, and how to design a limiter that keeps working, on purpose, when a Redis node dies.5 checkpoints · 32 chapters
  5. #13 · W01 · DAY 04Intermediate19 min
    Hot Keys and SkewHot keys and skew: when one key gets all the trafficWhy traffic follows power laws, how a hot key drags down its whole partition, how to spot one with a Count-Min Sketch, and the layered defence (edge, local cache, split keys, coalescing) that takes a skewed URL shortener's p99 from 500 ms to 20 ms.5 checkpoints · 33 chapters
  6. #14 · W01 · DAY 05Intermediate18 min
    Session Store DesignSession store design: 10 million users, every requestDesigning a session store for 10 million concurrent users end to end: sticky vs distributed vs client-side sessions, sizing a Redis Cluster, local caching and invalidation, what users see when a datacentre fails, and the written decision between Redis, DynamoDB and a custom build.5 checkpoints · 33 chapters
  7. #15 · W01 · BOSSAdvanced20 min
    Design a URL Shortener at ScaleCapstone: design a URL shortener at scale, in 45 minutesA full mock interview for TinyLink: clarify, estimate 120,000 redirects a second and 300 TB, sketch the architecture, then deep-dive into short code generation, viral URLs, sharding, rate limits and replication, and finish with edge cases, failures and monitoring. Every Week 1 idea in one answer.5 checkpoints · 35 chapters

Week 2 · Failure-First Design7 lectures · 130 min

  1. #16 · W02 · PREVIEWIntermediate9 min
    Failure-First Design PreviewWeek 2 Preview: assume everything failsWeek 2 assumes everything you built will fail: timeouts, retries, idempotency, circuit breakers, delivery guarantees and leader election, practised on a payment pipeline, a webhook delivery system and a distributed job scheduler.2 checkpoints · 14 chapters
  2. #17 · W02 · DAY 01Intermediate22 min
    Timeout HellTimeout Hell: how long do you wait?Why a slow service is worse than a dead one, why averages lie, and how to set timeouts for a payment service that calls fraud check, bank and notification: P99 times 2 to 3, a 4.5-second budget, deadline propagation, cascade failures and bulkheads, connection vs read timeouts, adaptive timeouts and hedged requests.5 checkpoints · 34 chapters
  3. #18 · W02 · DAY 02Intermediate21 min
    Idempotency in PracticeIdempotency: charged exactly once, however many clicksWhy a client can't tell a lost request from a lost response, and how idempotency keys make the Day 1 payment service safe to retry: the processing, completed and failed record, who makes the key, how long to keep it, checking the bank after a timeout, double clicks, crashes, partial completion, and defence in depth.5 checkpoints · 34 chapters
  4. #19 · W02 · DAY 03Intermediate21 min
    Circuit BreakersCircuit breakers: stop calling what's clearly brokenWhen the bank is clearly failing, stop calling it: the closed, open and half-open states, what counts as a failure, rate instead of count, fallbacks you can and can't fake, the thundering herd on recovery, servers that disagree, outages a breaker hides, and how breakers, retries and bulkheads stack with Day 1 timeouts and Day 2 idempotency.5 checkpoints · 34 chapters
  5. #20 · W02 · DAY 04Intermediate18 min
    Webhook Delivery SystemWebhook delivery: at least once, to systems you don't controlDelivering a million webhooks an hour to receivers that are slow, down or lying: why at-least-once plus idempotent receivers is the only honest guarantee, the event bus, dispatcher, partitioned queues and workers, a 39-hour retry schedule, HMAC signatures and replay protection, sizing the workers, and getting a receiver that was down for 2 hours back in 13 minutes instead of 2 hours.5 checkpoints · 32 chapters
  6. #21 · W02 · DAY 05Intermediate18 min
    Distributed Cron & Job SchedulingDistributed cron: once, on schedule, while servers dieWhy a scheduled job runs three times on three servers, why locks with and without expiry both fail, and how leader election with leases, fencing tokens, heartbeats, stuck-job detection and idempotent, resumable jobs get you effectively-once execution. Then the leader dies mid-job, the real-world tools, and every Week 2 pattern inside one order-processing job.5 checkpoints · 31 chapters
  7. #22 · W02 · BOSSAdvanced21 min
    The Ultimate System Design InterviewCapstone: a global flash sale for MegaMart, in 45 minutesA full mock interview: 5 million users chasing 10,000 units in 10 minutes. Clarify, estimate 150,000 requests a second and 80,000 notifications a second, sketch the architecture, then deep-dive into atomic claims in Redis, a checkout that never double-charges, 2.4 million notifications in seconds, and a sale scheduler that starts each sale once. Every Week 1 and Week 2 idea in one answer.5 checkpoints · 35 chapters

Week 3 · Messaging and Async Processing7 lectures · 126 min

  1. #23 · W03 · PREVIEWIntermediate8 min
    Messaging and Async Processing PreviewWeek 3 Preview: stop waiting, queue the workWhy synchronous chains collapse under load, and how Week 3 decouples them: queues versus streams, the transactional outbox, backpressure, dead letters and poison pills, and an audit log that brings it all together.2 checkpoints · 14 chapters
  2. #24 · W03 · DAY 01Intermediate20 min
    Queue vs StreamQueue vs stream: work to be done, or things that happened?Why synchronous chains collapse, the two mental models of messaging, point-to-point, pub-sub and consumer groups, delivery and ordering guarantees, what goes wrong in production (crashes, rebalances, lag), how LinkedIn, Uber and webhook senders chose, and how to say it in an interview.5 checkpoints · 34 chapters
  3. #25 · W03 · DAY 02Intermediate20 min
    Transactional OutboxTransactional outbox: two writes, made oneWhy save-then-publish silently loses events, how the transactional outbox makes the database write and the event atomic, polling versus CDC, why publishing is still at-least-once, and the edge cases: a Kafka outage backlog, two publishers, out-of-order events, cleanup and monitoring.5 checkpoints · 34 chapters
  4. #26 · W03 · DAY 03Intermediate19 min
    Backpressure and Flow ControlBackpressure: when producers outrun consumersWhy async pipelines have no natural brake, how to detect backpressure from lag, depth and latency, the four responses (shed, rate limit, scale, spill over) and the trilemma behind them, the edge cases of cascades, recovery herds and hot partitions, and how Netflix, LinkedIn and a surge-pricing pipeline cope.5 checkpoints · 34 chapters
  5. #27 · W03 · DAY 04Intermediate19 min
    Dead Letters and Poison PillsDead letters and poison pills: what to do with messages that won't processHow one poison pill froze checkout for 4 hours, how to classify failures as transient, permanent or poison, the DLQ patterns (simple, categorized, delayed retry, error-specific), retry counts and retention, the edge cases that bite (DLQ consumers failing, replays breaking, infinite loops, duplicates), and safe replay for payments.5 checkpoints · 31 chapters
  6. #28 · W03 · DAY 05Intermediate20 min
    Audit Log SystemAudit log system: every action, never lost, provably untouchedA complete audit log for a financial company at 50,000 events a second with 7-year retention: outbox capture, Kafka transport, a consumer with backpressure and a DLQ, tiered storage, hash chaining for tamper evidence, the edge cases (outbox growth, lag, broken chains, clock skew), real-world variants, and a banking mock interview. Every Week 3 pattern in one system.5 checkpoints · 32 chapters
  7. #29 · W03 · BOSSAdvanced20 min
    Event-Driven Food Delivery Order SystemCapstone: an event-driven food delivery order system, in 45 minutesA full mock interview: clarify an order lifecycle across 50 cities, estimate 100 orders and 5,600 event deliveries a second, sketch an outbox-plus-Kafka architecture, then deep-dive into the outbox, dinner-rush backpressure, DLQs with compensation, and an audit trail for disputes, and finish with scaling, edge cases, monitoring and alerts. Every Week 3 idea in one answer.5 checkpoints · 35 chapters

Week 4 · Caching7 lectures · 126 min

  1. #30 · W04 · PREVIEWIntermediate9 min
    Caching PreviewCaching: beyond just add RedisWhy caching is deceptively hard, and a tour of Week 4: the four caching patterns, invalidation strategies, thundering herd defences, push versus pull feeds, and caches at every tier, tied back to Week 3's messaging.2 checkpoints · 14 chapters
  2. #31 · W04 · DAY 01Intermediate20 min
    Caching PatternsCaching patterns: which one, and why?Why a flash sale took the site down, what caching buys you, the four patterns (cache-aside, read-through, write-through, write-behind) and when to use each, how a cache fails gracefully, and how to design a product catalog cache in an interview.5 checkpoints · 34 chapters
  3. #32 · W04 · DAY 02Intermediate19 min
    Invalidation StrategiesInvalidation: getting stale data outWhy a flash sale showed the wrong price for an hour, the trilemma of freshness, simplicity and performance, TTL, event-driven and versioned invalidation, why delete beats update, the TTL safety net, leases, decomposed caching, and how to invalidate across regions.5 checkpoints · 32 chapters
  4. #33 · W04 · DAY 03Intermediate20 min
    Thundering HerdThundering herd: taming the stampedeHow a single expired key took Black Friday down, the maths of the herd, five defences (locking, coalescing, probabilistic expiry, background refresh, stale-while-revalidate) and how to choose, the edge cases that break them, and how Instagram and a trending-topics design keep the database safe.5 checkpoints · 32 chapters
  5. #34 · W04 · DAY 04Intermediate18 min
    Feed CachingFeed caching: push, pull, and the celebrityWhy a personalised feed is hard to cache, fan-out on write versus fan-out on read, the celebrity problem and the hybrid that solves it, ranking, sharding and warming, how Twitter, Instagram and LinkedIn choose, and how to design the Instagram feed in an interview.5 checkpoints · 32 chapters
  6. #35 · W04 · DAY 05Intermediate19 min
    Multi-Tier CachingMulti-tier caching: every layer, one designHow one request passes through five caches, what belongs at the browser, CDN, gateway and Redis, Cache-Control and Vary, why you invalidate from the inside out, caching for anonymous and logged-in users, and how Netflix and an AWS-style shop split their tiers.5 checkpoints · 32 chapters
  7. #36 · W04 · BOSSAdvanced21 min
    Design a Global E-Commerce Product Catalog SystemCapstone: a global product catalog, cachedA full interview on a global e-commerce catalog: requirements and freshness budgets, why the hit ratio must stay above 99%, the multi-tier architecture, flash-sale herd protection and warming, per-type invalidation, activity-tiered personalisation, the cache matrix, surviving a Redis outage, and how to monitor it all.5 checkpoints · 35 chapters

Week 5 · Consistency and Coordination7 lectures · 130 min

  1. #37 · W05 · PREVIEWAdvanced8 min
    Consistency and Coordination PreviewConsistency and coordination: the cost of correctWhere Week 4's stale caches stop being good enough: the last item sold twice, the transfer that loses money, the edit that vanishes and the two leaders, then a tour of Week 5 from consistency models to sagas, durable workflows, CRDTs and fenced locks.2 checkpoints · 14 chapters
  2. #38 · W05 · DAY 01Advanced21 min
    Consistency ModelsConsistency models: who sees a write, and whenWhat consistent really means: the visibility question, the trade-off triangle, six models from linearizable to eventual, CAP stated correctly, a consistency-aware repository, DynamoDB, Spanner and TAO, quorums and their limits, isolation levels and locking, and a shopping cart interview.5 checkpoints · 34 chapters
  3. #39 · W05 · DAY 02Advanced21 min
    Distributed Transactions — The Saga PatternSagas: transactions without a shared rollbackWhy two-phase commit fails across microservices, how a saga replaces it with local transactions and compensations, choreography versus orchestration, the pivot and forward recovery, a crash-safe orchestrator with idempotency keys, booking and trip sagas, the mistakes that leave sagas stuck, and how to run them in production.5 checkpoints · 34 chapters
  4. #40 · W05 · DAY 03Advanced19 min
    Saga Orchestration Deep DiveDurable execution: sagas that survive anythingWhy a hand-built orchestrator is not enough, how Temporal records and replays workflow history, workflows versus activities and the determinism rules, task queues, signals and queries, state machines, versioning with patched, continue-as-new, activity timeouts, idempotent starts, Cadence and Conductor, and a loan-application interview.5 checkpoints · 32 chapters
  5. #41 · W05 · DAY 04Advanced20 min
    Conflict ResolutionConflict resolution: when two writes collideThe offline cart and the lost update, five resolution strategies, why last-write-wins loses data under clock skew, vector clocks and siblings, CRDTs from G-Counters to OR-Sets and text, replicating CRDT state, choosing a strategy per field, conflict detection, tombstone garbage collection, and an offline notes interview.5 checkpoints · 32 chapters
  6. #42 · W05 · DAY 05Advanced20 min
    Leader Election and CoordinationLeader election: exactly one in chargeWhy split-brain happens and timeouts cannot prevent it, fencing tokens checked where the write lands, consensus and Raft elections and terms, ZooKeeper and etcd election recipes, database leases, quorum re-confirmation, Kafka epochs, Redis Sentinel and Kubernetes leases, clock mistakes, and a cache-invalidation interview.5 checkpoints · 31 chapters
  7. #43 · W05 · BOSSExpert21 min
    Multiplayer Game Matchmaking SystemCapstone: a matchmaking system that never double-booksA full interview on multiplayer matchmaking: requirements and per-thing consistency, the numbers, the architecture and data flow, one fenced matchmaker per region, crash recovery, ratings with per-operation consistency, the match creation saga and its pivot, party membership as an OR-Set, scaling, failures, and how to monitor it.5 checkpoints · 35 chapters

Week 6 · Real-Time Delivery7 lectures · 155 min

  1. #44 · W06 · PREVIEWAdvanced10 min
    Real-Time Delivery PreviewReal-time delivery: one notification platform, five daysWeek 6 designs one real system end to end: a notification platform for a fintech super-app in India, with two halves, store and forward through push, SMS and email providers, and a real-time tier that pushes to about 10 million live connections in under a second. The brief and its numbers, why the gateways are sized by connections, how every Week 1 to 5 idea finds a job, one payment notification as you'd say it in an interview, the zombie socket, and the five days ahead.2 checkpoints · 14 chapters
  2. #45 · W06 · DAY 01Advanced22 min
    Designing a Real-Time Notification PlatformDesigning a real-time notification platformOne Friday evening, five failures, and the platform that prevents them: the two halves (providers and a real-time tier), FERNS and the requirements, five classes of notification, why one queue makes an OTP 8 minutes late, the estimate where SMS is 5% of messages and about 89% of the bill, the seven pieces of the architecture, one payment traced from the Send API to Priya's screen, the five records, the channel trade-offs, and how LinkedIn, Uber and Slack split the same problem.5 checkpoints · 31 chapters
  3. #46 · W06 · DAY 02Advanced24 min
    The Delivery Pipeline: Guarantees, Priorities and PreferencesThe delivery pipeline: guarantees, priorities and preferencesOne festive-sale campaign, six failures, and the pipeline that prevents them: an idempotency key from the business event, committed with the outbox; preferences checked at routing and again at the last mile; quiet hours in the user's clock; batching that turns 50 pushes into 2; three priority lanes with their own topics, workers and quota; the inbox written before any push; at-least-once with dedup at every hop instead of exactly-once; classified retries cut at expiry; per-zone waves; an escalation saga on durable timers; and why a 10M campaign takes about 22 minutes whatever you add.5 checkpoints · 34 chapters
  4. #47 · W06 · DAY 03Advanced24 min
    Real-Time Channels: WebSockets and SSE at ScaleReal-time channels: WebSockets and SSE at scaleDiscord's 25 March 2026 reconnect storm, and the in-app tier that survives one: four ways to push to an online user and when SSE or WebSockets fits; HTTP/2 and HTTP/3; a separate gateway tier sized by connections, blast radius and reconnect admission (10M connections, 200K per node, 75 nodes); a connection registry with per-gateway leases and epochs; one pub/sub channel per gateway; the inbox as the record and resume by sequence number; heartbeats under the shortest idle timeout; full-jitter reconnects, admission control, bounded queues and slow drains; the fallback to mobile push; and auth on a long-lived socket.5 checkpoints · 34 chapters
  5. #48 · W06 · DAY 04Advanced24 min
    Presence and Chat Fan-Out at ScalePresence and chat fan-out at scaleOne illustrative evening in the Goa Trip group chat, five classic bugs, and the layer that fixes them on top of Day 3's connections: three classes of event (durable, soft state, ephemeral); presence as heartbeats with a TTL and a delayed offline trigger, stored per device, with last seen stamped by the server; visible-only subscriptions that take presence from ~84,000 to ~22,000 pushes a second; typing that throttles, expires and drops first; accept then distribute, with write, read and hybrid fan-out; hot rooms (one copy per node, passive sessions, relays); per-conversation sequence numbers fenced by a unique key; receipts as forward-only cursors; store-and-forward sync and multi-device cursors; at-least-once with dedup on both ends; and split-brain presence, clock skew and half-finished fan-outs.5 checkpoints · 34 chapters
  6. #49 · W06 · DAY 05Advanced24 min
    Operations, Scale and Edge CasesOperations, scale and edge casesGOV.UK Notify's late-2019 SMS failover that broke both providers, and how to run the week's platform: a delivery funnel measured from created_at, with oldest message age per lane; SLOs that stop at the provider hand-off (99.9% of critical in 10 seconds is about 14 minutes of stall a month); pages on symptoms and a runbook; campaigns as paced, pausable jobs that respect FCM's quota and ramp rules; priority lanes that reach the provider through reserved quota, separate SMS senders and short validity periods; breakers per provider and route; SMS always split and shifted 10 points at a time; APNs outages and OTPs that keep one code across failover; segments, GSM-7 and UCS-2, and halving a ~$396,000-a-day SMS bill; SMS pumping; losing a region (fence, replay, re-admit); time zones, stale tokens and duplicates; and the whole week as one 45-minute interview.5 checkpoints · 32 chapters
  7. #50 · W06 · BOSSExpert27 min
    Food Delivery Order SystemCapstone: a food delivery order system, live, Weeks 1 to 6A full 45-minute interview that uses every week so far: clarify a 5 million order a day platform and choose push over polling, estimate 230 orders and 7,000 writes a second and a real-time tier of about 600,000 connections on 5 gateways, sketch an event-driven architecture on top of the Week 6 notification platform, then deep-dive into an outbox with stable order IDs, idempotent Stripe payments, race-free driver assignment, the order saga, live tracking with coalesced locations and sequenced status, rate limits and backpressure, three notification lanes with the inbox, the restaurant's socket and driver presence, and finish with 10x scaling, edge cases, alerts, and what to build first.5 checkpoints · 38 chapters

Week 7 · Designing a Search System7 lectures · 131 min

  1. #51 · W07 · PREVIEWAdvanced9 min
    Designing a Search System PreviewSearch: making data findable at scaleWhy search is more than putting data in Elasticsearch: why SQL LIKE fails, the indexing, relevance and scale problems, the product search platform we build this week, its architecture and rough sizing, the five days from inverted indexes to typeahead and location search, and how Weeks 1 to 6 feed into it.2 checkpoints · 14 chapters
  2. #52 · W07 · DAY 01Advanced18 min
    Search Fundamentals & ArchitectureHow search engines thinkWhy SQL LIKE dies on 50 million rows, the inverted index from first principles, the text analysis pipeline and why index and query must share an analyzer, field types and the multi-field pattern, Elasticsearch shards, node roles and scatter-gather, the search service, and sizing the cluster.5 checkpoints · 29 chapters
  3. #53 · W07 · DAY 02Advanced18 min
    Indexing PipelineKeeping search freshWhy dual-writing to PostgreSQL and Elasticsearch fails, change data capture with Debezium and Kafka, a batching, prioritised indexing pipeline with external versions, rate-limited and resumable bulk imports, zero-downtime reindexing with aliases, and the metrics, runbooks and delete patterns that keep it healthy.5 checkpoints · 29 chapters
  4. #54 · W07 · DAY 03Advanced17 min
    Query Processing & RelevanceRanking the haystackHow BM25 scores documents (term frequency with saturation, IDF, length normalisation) and how to tune it, query versus filter context and the filter cache, field, phrase, negative and business boosts, function scores and decay, multi-match types, progressive relaxation for no results, and the metrics that tell you if relevance is working.5 checkpoints · 28 chapters
  5. #55 · W07 · DAY 04Advanced24 min
    Typeahead at Scale: Autocomplete, Spelling and FacetsTypeahead at Scale: Autocomplete, Spelling and FacetsA sale night where the search box breaks five ways, and the typeahead system that survives it: a 100 ms keystroke budget with about 15 ms for the server; one search becoming about 12 requests (33,000 a second at peak); debounce, tab cache and a sequence check against stale answers; a trie with top-k at every node, really a prefix-to-list map, and Lucene's FSTs; the engine's options and two lists in one dropdown; building suggestions from logs with distinct users, a 14-day half-life, PII and policy filters, a trending overlay and versioned snapshots; CDN caching by prefix and locale, why first-letter sharding fails, and why an 11 GB index is replicated, not sharded; personalization kept out of shared caches; Hinglish as extra keys built offline; did you mean as a noisy channel; and multi-select facets with post_filter.5 checkpoints · 33 chapters
  6. #56 · W07 · DAY 05Advanced24 min
    Location Search and Search at ScaleLocation search and search at scaleOne illustrative launch night in Bengaluru and the location bugs that break it, then the fixes: why a B-tree on (lat, lng) reads a 600 km strip; cells, coverings and refine; geohash and its edge problem (cell plus 8 neighbours); quadtrees, S2's numbered Hilbert cells and H3's equidistant hexagons; R-trees in PostGIS and BKD points in Elasticsearch; radius queries end to end and a safe ring count; k-nearest with a stopping bound; moving partners as soft state in memory (75,000 writes a second, only about 1,700 cell moves); sharding by load and hot cells; and the search cluster's topology, shard sizing and alias reindexing.5 checkpoints · 34 chapters
  7. #57 · W07 · BOSSExpert21 min
    Designing a Legal Document Search SystemCapstone: legal document searchA full interview on search for law firms: requirements and estimates for 100 million documents, the architecture and upload flow, a parser for boolean and proximity queries, five layers of tenant isolation, a citation network in Elasticsearch, OCR ingestion, scaling to a billion documents, edge cases, monitoring, and what to build first.5 checkpoints · 34 chapters

Week 8 · Designing an Analytics Pipeline8 lectures · 148 min

  1. #58 · W08 · PREVIEWAdvanced8 min
    Designing an Analytics Pipeline PreviewAnalytics: from raw events to answersWhy Week 8 turns from systems that serve data to systems that understand it: the volume, velocity and accuracy problem, the pipeline from ingestion to dashboards, event schemas, Lambda versus Kappa, late data, query optimisation, and the week's plan.2 checkpoints · 14 chapters
  2. #59 · W08 · DAY 01Advanced20 min
    Event Ingestion at ScaleEvent ingestion: capture everything, drop nothingHow to capture every meaningful action reliably at scale: events as immutable facts, the event envelope and safe schema evolution, the collection API, validation and best-effort enrichment, Kafka topics, keys and producer guarantees, backpressure and load shedding, multi-region collection, and the mistakes to avoid.5 checkpoints · 33 chapters
  3. #60 · W08 · DAY 02Advanced20 min
    Streaming vs Batch ProcessingStreaming vs batch: now, or exactly?When to stream, when to batch, and how to do both: the latency, accuracy and cost trade-off, Lambda's batch and speed layers and its two-codebase problem, Kappa's replay and its big question, how to choose, Flink windows, watermarks and state, Spark batch jobs, unified APIs, and the mistakes that produce wrong numbers.5 checkpoints · 31 chapters
  4. #61 · W08 · DAY 03Advanced18 min
    Data Modeling for AnalyticsData modeling: designing for queriesHow to model data so analytics stays fast over billions of rows: OLTP against OLAP, the star schema with facts, dimensions and grain, slowly changing dimensions and point-in-time accuracy, columnar formats, partitioning and Z-ordering, rollups and materialized views, the ETL load order, and the classic modeling mistakes.5 checkpoints · 31 chapters
  5. #62 · W08 · DAY 04Advanced18 min
    Late-Arriving Data and CorrectnessLate data: when real-time isn't real-timeWhy numbers change after the fact and how to keep trust: event time against processing time, watermarks and their strategies, sizing lateness from a measured distribution, windows and late events, patching against reprocessing, versioned results, a production pipeline with daily finalization, T+1 and T+7 reporting, and the dashboard mistakes to avoid.5 checkpoints · 31 chapters
  6. #63 · W08 · DAY 05Advanced19 min
    Query Layer and OptimizationThe query layer: making big data feel smallHow to make dashboard queries over billions of rows fast and affordable: choosing among warehouses, real-time OLAP, lake engines and embedded engines, why queries are slow, partitioning and clustering, when to pre-aggregate and how to route to rollups, materialized views, multi-layer caching with TTLs by freshness, multi-tenant isolation and quotas, a production query service, and the cost mistakes to avoid.5 checkpoints · 32 chapters
  7. #64 · W08 · DAY 06Advanced24 min
    Counting at Scale: Bloom Filters, HyperLogLog, Count-Min Sketch and Top-KCounting at scale: Bloom filters, HyperLogLog, Count-Min and top-kWhy exact counting breaks when every distinct key costs memory per slice and per day, and the sketches that count in fixed memory with a known, one-directional error: Bloom filters for membership (sizing, over-filling, deletes, LSM reads, Akamai's cache-on-second-hit, a dedup gate that loses nothing), HyperLogLog for distinct counts (registers, error, HLL++, merging, Redis and BigQuery), Count-Min for frequencies, Misra-Gries and Space-Saving for top-k over minute panes, and where each sits in the week's pipeline.5 checkpoints · 34 chapters
  8. #65 · W08 · BOSSExpert21 min
    Real-Time Analytics for Video Streaming PlatformCapstone: analytics for a streaming platformA full interview on real-time analytics for a video streaming service: clarifying questions, a million events a second and a petabyte of data, the Kafka, Flink, Spark, ClickHouse and BigQuery architecture, the event envelope and regional ingestion, a trending score from unique viewers, late data from planes and subways with real-time, preliminary and final numbers, a star schema for creators, query layers, scaling 10 times, edge cases and monitoring.5 checkpoints · 33 chapters

Week 9 · Multi-tenancy and Security7 lectures · 124 min

  1. #66 · W09 · PREVIEWAdvanced8 min
    Multi-tenancy and Security PreviewMulti-tenancy, security and compliance: building for trustWhy a system built for scale can still fail an enterprise security questionnaire, and the week ahead: the tenant isolation spectrum, noisy neighbours, data residency under GDPR, deletion across many systems, defence in depth, and the document platform capstone.2 checkpoints · 13 chapters
  2. #67 · W09 · DAY 01Advanced20 min
    Tenant Isolation StrategiesTenant isolation: thousands of customers, one platformThe isolation spectrum from shared tables to separate cloud accounts, the three database patterns and their costs, tenant context taken from auth and carried through every layer, PostgreSQL row-level security and its traps, real hybrids from Slack, Salesforce and AWS, and how to prove isolation with tests.5 checkpoints · 33 chapters
  3. #68 · W09 · DAY 02Advanced19 min
    Noisy Neighbor PreventionNoisy neighbours: one tenant must never ruin it for everyoneHow one legitimate export took 500 tenants down, the six resources a tenant can exhaust, layered defences from gateway to infrastructure, token buckets and a shared Redis limiter, tiered quotas, query guards, per-tenant pools, fair scheduling, and lessons from Salesforce, Stripe and AWS.5 checkpoints · 30 chapters
  4. #69 · W09 · DAY 03Advanced19 min
    Data Residency and GDPRData residency and GDPR: the right data in the right placeWhy a German customer's legal letter forces a re-architecture: residency versus sovereignty, what counts as personal data, four regional patterns and per-tenant routing, lawful basis and recorded consent, cross-border transfers after Schrems II, DPAs and subprocessors, Slack's and AWS's approaches, and the mistakes that leak data across borders.5 checkpoints · 30 chapters
  5. #70 · W09 · DAY 04Advanced19 min
    Right to DeletionRight to deletion: erasing a user from dozens of systems, and proving itWhat GDPR Article 17 requires and when you may refuse, why deletion is hard, hard versus soft delete versus anonymisation, the data inventory, an ordered and retryable deletion orchestrator with verification, backups that expire and restores that re-apply deletions, the compliance report, and how Stripe and Slack handle it.5 checkpoints · 31 chapters
  6. #71 · W09 · DAY 05Advanced18 min
    Security ArchitectureSecurity architecture: defence in depth for a multi-tenant systemFrom a database password committed to main: defence in depth, zero trust and least privilege, trust boundaries and STRIDE, encryption in transit, at rest and per field with a key hierarchy, secrets in a vault with rotation, login, tokens and revocable sessions, tenant-first authorisation, Stripe and BeyondCorp, and incident response.5 checkpoints · 31 chapters
  7. #72 · W09 · BOSSExpert21 min
    Design a Multi-Tenant Enterprise SaaS PlatformCapstone: a multi-tenant enterprise document platform, in 45 minutesA full mock interview: clarify 500 tenants across three regions, estimate 50 TB, 1,000 requests a second and a 3 TB index, sketch regional data planes under a metadata-only control plane, then deep-dive into five isolation layers, quotas and fair queues, residency and export, ordered deletion, and layered security, and finish with 10x scaling, edge cases, per-tenant monitoring and alerts. Every Week 9 idea in one answer.5 checkpoints · 37 chapters

Week 10 · Production Readiness and Operational Excellence7 lectures · 118 min

  1. #73 · W10 · PREVIEWAdvanced8 min
    Production Readiness and Operational Excellence PreviewWeek 10 preview: from building to operatingThe operations week: why designing a system isn't the same as running it, the six pillars of production readiness, a tour of SLOs, observability, safe deployment, capacity planning and incident management, the real-time bidding capstone, and the mindset shift from "I built it" to "I can operate it".2 checkpoints · 14 chapters
  2. #74 · W10 · DAY 01Advanced19 min
    SLIs, SLOs and SLAsSLIs, SLOs and SLAs: defining healthyWhy reliability needs precise language, the SLI to SLO to SLA ladder, the four golden signals and a precise SLI spec, why the goal is appropriate rather than maximum reliability, error budgets and their policies, multi-window burn rate alerting, dependency chains, tiered SLOs, and how to talk about it all in an interview.5 checkpoints · 31 chapters
  3. #75 · W10 · DAY 02Advanced17 min
    ObservabilityObservability: seeing inside productionFrom a 3:47 AM page to a root cause in five minutes: monitoring versus observability, the three pillars and how a trace ID ties them together, metric types and the cardinality trap, RED and USE, structured logs and what never to log, distributed tracing and context propagation, the observability stack, dashboards, symptom-based alerts and runbooks, and a live debugging interview.5 checkpoints · 29 chapters
  4. #76 · W10 · DAY 03Advanced18 min
    Deployment StrategiesDeployment strategies: shipping without breakingThe deployment paradox and why small, frequent deploys win; big bang, rolling, blue-green and canary compared; automated canary analysis and rollback thresholds; feature flags and consistent bucketing; expand-contract schema migrations; the four kinds of rollback; how Amazon and Google deploy; and how to talk about it in an interview.5 checkpoints · 32 chapters
  5. #77 · W10 · DAY 04Advanced17 min
    Capacity PlanningCapacity planning: scaling before you need toFrom a Friday-night 5x surprise to a plan: the measure-forecast-identify-plan-validate cycle, headroom and its bands, finding the breaking point, forecasting with lead time, bottlenecks, Little's Law and the queueing spiral, five kinds of load test, scaling up versus out, auto-scaling policy and lag, Netflix and Stripe, and a dinner-rush capacity interview.5 checkpoints · 29 chapters
  6. #78 · W10 · DAY 05Advanced18 min
    Incident ManagementIncident management: when things go wrongFrom a 3:17 AM page to a blameless postmortem: what counts as an incident, severity levels, the lifecycle and its four clocks, incident roles, sustainable on-call and what should page, handoffs, the mitigation decision tree and runbooks, five whys, the postmortem, communicating inside and out, how Google and Stripe respond, and prevention.5 checkpoints · 31 chapters
  7. #79 · W10 · BOSSExpert21 min
    The Grand FinaleThe grand finale: a global real-time bidding platformThe final interview of Weeks 0 to 10: a 100 ms, 500,000 request-a-second ad auction across six continents. Requirements, estimates and a latency budget; the regional architecture and one request end to end; hierarchical budget leases that never overspend; DSP fan-out with circuit breakers and load shedding; a transactional-outbox audit trail and tiered storage; tiered fraud detection; Super Bowl scale and edge cases; SLOs and dashboards; and a send-off for ten weeks, with Week 11's AI systems next.5 checkpoints · 34 chapters

Week 11 · Designing AI Systems7 lectures · 156 min

  1. #80 · W11 · PREVIEWAdvanced8 min
    Designing AI Systems PreviewDesigning AI systems: the model is one component, five daysWeek 11 adds a new kind of component to the toolkit, a large language model, and builds reliable products on top of one. AI features in production are distributed systems with new failure modes: a demo against production, the six failure modes, MegaMart Assist and its illustrative numbers, why 900 requests a minute can still hit a rate limit, how the week sits on Weeks 1 to 10, how the questions change, the injected refund, and the five days ahead.2 checkpoints · 12 chapters
  2. #81 · W11 · DAY 01Advanced24 min
    LLM Serving: Tokens, Latency and CostLLM serving: tokens, latency and costMegaMart Assist's launch evening, and the model call underneath it: tokens and tokenizers, the context window and a conversation that grows every turn, prefill and decode, time to first token and time per output token, static vs continuous batching, the KV cache and why tokens resident set concurrency, vendor API or self-hosted vLLM, streaming through your own stack (buffering proxies, heartbeats, errors after the 200), provider rate limits and spend caps, an LLM gateway that admits by tokens, and the cost arithmetic that makes input three-quarters of the bill.5 checkpoints · 32 chapters
  3. #82 · W11 · DAY 02Advanced24 min
    Embeddings and Vector SearchEmbeddings and vector search: finding what the customer meantWhy keywords miss meaning and vectors miss exact tokens, what an embedding model gives you, why exact search is a memory-bandwidth problem, how HNSW, IVF and product quantisation trade recall for latency and memory, measuring recall@k, filters that silently drop results, hybrid search fused with RRF, choosing and sizing a store for MegaMart Assist, sharding, quiet failures, and changing the embedding model safely.5 checkpoints · 34 chapters
  4. #83 · W11 · DAY 03Advanced24 min
    RAG SystemsRAG systems: the answer is only as good as what you retrievedWhy MegaMart Assist cited a superseded return policy 212 times, and the pipeline that prevents it: structure-aware parsing and chunking, contextual retrieval, metadata and dedup, CDC into idempotent upserts with deletes, a DLQ and a freshness SLO, effective-dated versions, blue/green re-embedding, query rewriting, hybrid retrieval then a cross-encoder reranker, context within a token budget, verified citations, permission-aware retrieval, failure modes, and when RAG is the wrong tool.5 checkpoints · 34 chapters
  5. #84 · W11 · DAY 04Advanced24 min
    Evaluation and GuardrailsEvaluation and guardrails: measure it, fence it inOne illustrative week at MegaMart Assist (a prompt shipped on a vibe check, a refund no policy allows, an injection hidden in a seller's return policy) and the three layers that answer it: offline evals on a versioned golden set with code graders, calibrated LLM judges and per-slice gates (and what a run costs); the judge's position, verbosity and self-preference biases; retrieval recall versus faithfulness, and why faithful isn't correct; online metrics, canaries and A/B tests by customer; direct and indirect prompt injection, image exfiltration, EchoLeak and the lethal trifecta; defence in depth with a tool gate, taint tracking and confirmation; PII tokenisation; hallucination controls after Moffatt v. Air Canada; and a degraded-mode ladder that fails closed for actions.5 checkpoints · 34 chapters
  6. #85 · W11 · DAY 05Advanced24 min
    Cost, Caching and OperationsCost, caching and operations: running an AI featureSale week at MegaMart Assist: the four token meters and why history makes cost grow with the square of the turns, provider prompt caching (prefix order, exact match, prices, and why cache reads are rate-limit headroom), exact and semantic answer caches and their false hits, routing and cascades and their break-even, batch APIs at half price, reserve-then-settle budget governors with a spend ladder, one retry layer and costed failover, OpenTelemetry spans and cost attribution, real provider incidents, runbooks, and the monthly cost model.5 checkpoints · 32 chapters
  7. #86 · W11 · BOSSExpert28 min
    Design an AI Customer-Support AssistantCapstone: MegaMart Assist, an AI support assistant, end to endThe course's last interview: design an AI customer-support assistant that answers with citations, acts on orders and hands off to people, in English, Hindi and Hinglish. Requirements and a token estimate (23,010 input tokens a conversation, ~3.45 million counted tokens a minute uncached, ~290,000 cached); cost per conversation; a controller, a tool gate and an LLM gateway; one turn through the agent loop; a first-words budget of about 0.9 to 1.3 s; hybrid retrieval in pgvector with filters inside the search; fresh, versioned, permission-aware ingestion; narrow tools where the model never picks the refund amount; proposals the customer confirms, executed once; injection defences; evals and rollout; a degradation ladder that keeps the tools identical; the prompt layout, routing and budgets; the Hindi sale-evening curveball; SLOs and dashboards; and a send-off for the whole course.4 checkpoints · 38 chapters

Mock interviews8 lectures · 390 min

  1. #87 · M01Intermediate47 min
    Paisly · Phone OTP sign-in and sessionsMock interview: phone OTP sign-in and sessions at PaislyA full 45-minute model interview: Siddharth splits sign-in into its four paths, finds that the Diwali sale needs both SMS providers live, stores the OTP as an HMAC with capped guesses, uses signed tokens with a pushed deny list for lost phones, fails over on delivery receipts, fixes a replica-lag bug and a hot celebrity number, and pushes back on 7-day sessions with numbers.3 checkpoints · 60 chapters
  2. #88 · M02Intermediate48 min
    Billbolt · Bill payments and AutoPayMock interview: bill payments and AutoPay at BillboltA full 45-minute model interview: Vikram clarifies who confirms what, finds BillHub's 300 req/s as the real bottleneck, makes the pay call idempotent, contains a failing biller with per-biller breakers, makes AutoPay safe to run twice with unique runs and fencing tokens, and redoes the maths when AutoPay grows tenfold.3 checkpoints · 56 chapters
  3. #89 · M03Intermediate47 min
    Cartwala · Flash-sale catalog and pricesMock interview: the Noon Drop at CartwalaA full 50-minute model interview: Arjun splits browsing a price from charging one, proves with numbers that flushing the cache at 12:00 can't work, stores each product's price timeline in the cache so the flip needs no invalidation, pins the deal of the day in every pod's memory, survives a Redis shard dying mid-sale, re-prices every order from the primary through a pricing mistake, and keeps a poisoned price queue from ever causing a wrong charge.3 checkpoints · 56 chapters
  4. #90 · M04Intermediate52 min
    Wanderstay · Stays booking and availabilityMock interview: stays booking and availability at WanderstayA full 50-minute model interview: Sara splits a 250-to-1 look-to-book system into a stale-but-fast search path and an exact booking path, claims all nights in one conditional update, survives a thundering herd and a payment timeout, rejects last-write-wins on channel updates, and turns overbooking into a measured 10× goal.3 checkpoints · 59 chapters
  5. #91 · M05Advanced48 min
    Sunwaai · Support desk, ticket search and SLAsMock interview: the support desk at SunwaaiA full 50-minute model interview: Meghna sizes a multi-tenant help desk, feeds near-real-time ticket search from an outbox stream with external versions, makes search permission-aware and closes a stale-permission snippet leak, fires SLA timers once, tames a 200,000-ticket complaint storm with quotas and incident mode, and answers an EU residency request by reusing the tenant partition key.3 checkpoints · 58 chapters
  6. #92 · M06Advanced52 min
    Kaamkaaj · Job search, alerts and recruiter analyticsMock interview: job search, alerts and analytics at KaamkaajA recorded 50-minute senior system design round with Kabir Sethi at Kaamkaaj: scoping three systems, sizing a small index and a huge event stream, CDC-fed search, a shared notification platform that turns a 20,000-job burst into one push, percolator alerts, event-time analytics with late data, recruiter isolation, the applies mismatch and a safe reindex.3 checkpoints · 63 chapters
  7. #93 · M07Expert48 min
    Switchyard · Multi-tenant feature flags and experimentsMock interview: feature flags at SwitchyardA full 50-minute staff-level model interview: Tejas asks where evaluation happens before anything else, proves with numbers that SDKs must evaluate locally and that the control plane is tiny next to the data plane, makes bucketing sticky and identical in every language, streams deltas through the edge, budgets and proves a 5-second kill switch, refuses to trust last year's empty ruleset, protects experiments from reallocation, late data and sample ratio mismatch, contains a leaked SDK key, and turns a bank's demand for its own everything into a dedicated cell, BYOK and a relay proxy.3 checkpoints · 58 chapters
  8. #94 · M08Expert48 min
    Tillsy · Offline-first POS platform (final loop)Mock interview: the offline-first POS platform at TillsyA recorded staff-level final loop with Dr. Meera Iyer at Tillsy: billing that never needs the cloud, the reconnect storm, an idempotent versioned sync protocol, conflict rules without device clocks, regions and cells, a dedicated-cell deal, no-bill-lost guarantees, GDPR erasure against tax retention, a Diwali incident and the biggest risk in the design.2 checkpoints · 54 chapters

Side quests36 lectures · 554 min

  1. #95 · SQ-10Intermediate12 min
    Twitter/XTwitter/X: a post in every timeline in 5 secondsHow Twitter/X puts ~500M posts a day into followers' home timelines within 5 s and serves ~300K timeline reads a second from memory: push tweet IDs at write time for ordinary authors, pull celebrity posts at read time, cache IDs not tweets, degrade by delay in a spike, and delete with a tombstone filtered at hydration.4 checkpoints · 20 chapters
  2. #96 · SQ-06Intermediate15 min
    Netflix StreamingNetflix: the cloud decides, the ISP deliversHow Netflix starts any title in under 2 seconds for about 10 million concurrent streams: AWS only decides what to play, appliances inside ISPs filled off-peak deliver 50 terabits a second, the player adapts quality chunk by chunk, and breakers, ranked failover URLs and request coalescing keep it degrading instead of failing.4 checkpoints · 21 chapters
  3. #97 · SQ-07Intermediate17 min
    SpotifySpotify: any song in 200 millisecondsHow Spotify starts any of 100M+ tracks in under 200 ms for 777M monthly users: audio from the device or a CDN edge behind a signed URL, recommendations behind breakers off the play path, and play events counted exactly once with a play ID and event time.4 checkpoints · 24 chapters
  4. #98 · SQ-21Intermediate15 min
    Instagram Feed and StoriesInstagram: twenty posts out of thousands, in half a secondHow a feed and stories tray for 3 billion monthly users stays fast: media stored once and served from caches, small time-sortable IDs fanned out on write for most accounts and pulled for the huge ones, ranking as a funnel of filters and models, and stories that leave the tray when an index entry expires.4 checkpoints · 22 chapters
  5. #99 · SQ-05Intermediate13 min
    Google SearchGoogle Search: a thousand shards, and the slowest one sets the paceHow a search engine answers three words against tens of billions of pages in under 500 milliseconds: an inverted index sharded by document, a query that fans out to every shard under strict stage budgets, deadlines and hedged requests for the slow tail, crawling kept off the clock, and a fresh tier for breaking news.4 checkpoints · 21 chapters
  6. #100 · SQ-02Intermediate16 min
    WhatsApp MessagingWhatsApp: one hello, three ticks, nobody in between reads itHow WhatsApp's chat servers carry 100 billion end-to-end encrypted messages a day to 50 million connected phones without ever reading one, why the server is a delivery queue and not an archive, and how a message to an offline phone survives a dropped sync with no gaps and no duplicates.4 checkpoints · 23 chapters
  7. #101 · SQ-19Intermediate15 min
    YouTube Video PlatformYouTube: an upload on a train, and a view count nobody can fakeHow a video platform takes 20 million+ uploads a day over flaky connections, turns each into playable video within minutes, counts views honestly at millions a second, and picks 20 videos out of 20 billion in 100 ms: resumable uploads, chunked task graphs, view events with per-playback IDs, and two-stage recommendations.4 checkpoints · 23 chapters
  8. #102 · SQ-03Intermediate15 min
    Aadhaar (UIDAI)Aadhaar: a lookup in 200 ms, a search across 1.45 billionHow Aadhaar verifies any of 1.45 billion people in under 200 milliseconds while proving nobody enrols twice, by building one-to-one authentication and one-to-N deduplication as two separate paths, and how it protects fingerprints that can never be reset.4 checkpoints · 22 chapters
  9. #103 · SQ-09Intermediate14 min
    UberUber: the right car in under 3 secondsHow Uber matches a rider to a driver in under 3 s while ~500K driver pings a second land at peak: live locations as soft state in an H3 hexagon index in Redis, trips created exactly once in Spanner, ETA-led scoring with one PENDING offer at a time, per-cell smoothed surge, and a failover that replicates trips and rebuilds locations.4 checkpoints · 21 chapters
  10. #104 · SQ-08Intermediate14 min
    AWS S3AWS S3: never lose one of 500 trillionHow S3 keeps 500 trillion+ objects at 11 nines of durability and 200M+ requests a second: a partitioned index kept apart from 10 + 6 erasure-coded bytes spread across three AZs, fast repair, a witness check that makes every read see the latest write, prefix partitions that split on load, and versioning and Object Lock for the deletes durability can't stop.4 checkpoints · 21 chapters
  11. #105 · SQ-01Intermediate16 min
    India's UPIIndia's UPI: where's the money when a bank times out?How UPI's switch routes about 800 million payments a day between 740+ banks without ever holding the money, and how it stays safe when a credit times out halfway, a bank goes down, or status checks flood the switch.4 checkpoints · 24 chapters
  12. #106 · SQ-04Intermediate14 min
    Visa/Mastercard Global Payment NetworkVisa and Mastercard: an approval is a promise, not a paymentHow a card network routes about 434 billion transactions a year between merchants' banks and card issuers, roughly 14,500 financial institutions on Visa's network alone, inside a sliver of a 2-second checkout, why no money moves until netted settlement a day or two later, and how tiered timeouts, stand-in and one idempotency key keep a silent bank or a retry from failing or double-charging anyone.4 checkpoints · 21 chapters
  13. #107 · SQ-26Advanced17 min
    Truecaller Caller ID and Spam DetectionTruecaller: naming a stranger before the second ringHow caller ID and spam detection work for hundreds of millions of phones: 500 million+ users and 411.1 million daily users outside iOS (Q3 2026, preliminary), 68 billion+ spam calls identified and blocked in 2025; a read path where the phone answers first and the network is asked once, with a deadline, for a precomputed serving record; hash-partitioned, regionally replicated records with hot numbers kept as cache copies that are overwritten, never deleted; a crowd-written directory scored by weighing evidence (call proof, reporter trust, distinct reporters) in a stream, with weights from a daily batch; a signed regional spam list on the phone as a base plus deltas; private iPhone lookups through an Oblivious HTTP relay, Privacy Pass tokens and PIR over sharded data in memory; and the consent question, with Truecaller's statements, its critics, a 2026 Lagos ruling, India's DPDP Rules, unlisting within 24 hours and lineage on every name.4 checkpoints · 24 chapters
  14. #108 · SQ-17Advanced16 min
    Swiggy Food DeliverySwiggy: which rider, and when should they start riding?How a food-delivery platform gets about 2 million orders a day from kitchens it doesn't run to doors across the city: dispatching riders just in time for a predicted ready time, matching them in 20-second rounds per city, putting a clock on every kitchen step, and promising a calibrated quantile instead of an average.4 checkpoints · 23 chapters
  15. #109 · SQ-11Advanced13 min
    IRCTC Tatkal Ticket Booking SystemIRCTC Tatkal: 500 seats, 2 million handsHow a ~500-seat Tatkal quota opens to ~2 million people at 10:00:00 and sells each seat exactly once: a waiting room that admits only what the core can absorb, a dumb atomic Redis counter per pool that says no to 99.975% in milliseconds, a single-writer allocator, a hold-then-pay saga where a payment timeout becomes DEEMED_PENDING, and search kept on a separate plane.4 checkpoints · 21 chapters
  16. #110 · SQ-12Advanced16 min
    Blinkit Quick CommerceBlinkit: where do the ten minutes come from?How a quick-commerce platform gets a basket from a dark store about 2 km away to the door in about ten minutes, across 2,443 stores and millions of orders a day: win the minutes inside the store, reserve stock exactly at checkout, trust the shelf over the count, and show each customer an estimate the store can actually keep.4 checkpoints · 23 chapters
  17. #111 · SQ-16Advanced16 min
    BookMyShow Seat BookingBookMyShow: four seats in row H, and 13 million at noonHow a ticketing platform lets millions pick exact seats from a live map without ever selling one twice: one writer per show holding all the seats or none, holds that are states with their expiry on the seat, partner seats held by asking with our hold id, and a waiting-room front door that keeps 13 million people waiting cheaply and fairly.4 checkpoints · 21 chapters
  18. #112 · SQ-14Advanced17 min
    ChatGPT LLM ServingChatGPT: one token at a time, for a billion peopleHow an LLM serving stack streams replies to over a billion weekly users: count tokens and GPU memory instead of requests, batch hundreds of replies into every decode step with continuous batching and paged KV memory, route conversations to their cached prefix, never pay the GPU twice for a dropped stream, and choose fairly when demand beats capacity.4 checkpoints · 23 chapters
  19. #113 · SQ-18Advanced16 min
    Razorpay Payment GatewayRazorpay: charging exactly once when the bank never answersHow a payment gateway taking over a billion payments a quarter gives every one exactly one final outcome: idempotency records and guarded state transitions, an UNKNOWN state resolved by status checks and settlement files, routing per slice, a double-entry ledger, and webhooks delivered at least once.4 checkpoints · 24 chapters
  20. #114 · SQ-27Advanced17 min
    Flipkart Big Billion DaysFlipkart Big Billion Days: six million shoppers, five thousand phonesHow a national sale event works at Flipkart's scale: 6.3 million concurrent users in a minute in the 2026 opening hour, six to eight times the usual transactions and nearly 1,000 times the payment requests at the festive peak; a cached read plane and a small, exact write plane; the sale staged as a version so midnight is one pointer flip, with jittered refreshes instead of synchronised expiry; a line per deal at the edge, with a two-second lottery, tokens at the units times 1.3 and an honest answer for everyone else; stock held at checkout with expiring, keyed holds that are extended while money is in flight; unknown payment outcomes reconciled with the same key and confirmed orders written with an outbox; versioned price books that fail closed; and delivery dates backed by reserved wave capacity, answering each line of the founders' 2014 apology.4 checkpoints · 24 chapters
  21. #115 · SQ-35Advanced16 min
    FASTag Electronic TollingFASTag: one sticker, forty banks, and a barrier that can't waitHow India's electronic toll network works: about 120 lakh FASTag transactions a day on National Highway plazas, from 11.73 crore tags issued by 40 banks and acquired by 12. The lane decides alone in about a second, from a signed tag it can verify offline and a local exception list, and falls back to local data when the online check is slow; dozens of reads collapse into one passage with one transaction number that dedupes every later hop; the acquirer prices from the Mapper's class and presents through NPCI's switch, which settles whatever it processed, with deemed acceptance and status checks before retries; exception lists flow out as 10-minute diffs, with written liability windows (20 minutes, 60 minutes, code 176) that price their staleness; late crossings from offline plazas are processed up to 3 days, netted in three settlement cycles a day; one vehicle, one tag across every issuer; and what the Annual Pass and barrier-free tolling change.4 checkpoints · 24 chapters
  22. #116 · SQ-34Advanced17 min
    Amazon Prime Day CheckoutAmazon Prime Day: a cart that never says no, an order that happens onceHow a cart, checkout and order pipeline survive the busiest days of the year: Prime Day 2026 peaked at 192 million DynamoDB requests a second across all of Amazon's systems, but the service itself sees about 5,000 orders and 100,000 cart operations a second (assumed). A cart that never refuses an add, built from tagged lines and tombstones so removes stay removed where the 2007 Dynamo cart let them resurface; one purchase id per checkout page, recorded with the order and an outbox row in one transaction, so a retry returns the same order and a changed cart is a mismatch; retries at one layer; a hot deal split into sub-counters that sum to its stock; customer cells and shuffle-sharded shared services that keep a bad deploy to one cell in forty; and an orchestrated order pipeline where a payment timeout is unknown, not failed, and backlogs drain fresh work first.4 checkpoints · 24 chapters
  23. #117 · SQ-15Advanced16 min
    Figma Multiplayer EditingFigma multiplayer: one file, two hundred editorsHow a design tool lets up to 500 people edit one file at once: one owner server per file that holds it in memory and orders every property change, last-writer-wins per property, optimistic edits that never flicker, an outbox and a fenced journal so nothing anyone saw is lost, and cursors on their own cheap, lossy path.4 checkpoints · 21 chapters
  24. #118 · SQ-13Advanced16 min
    Zerodha Kite Trading PlatformZerodha Kite: one tap, one order, at 9:15:00How a broker platform survives the 9:15 open: orders, prices and reads on three paths sized for what each can lose, one idempotency key per tap, an UNKNOWN state reconciled with the exchange instead of a resend, one margin writer per account, and binary price snapshots fanned out to 1.5 million screens.4 checkpoints · 22 chapters
  25. #119 · SQ-28Advanced16 min
    GmailGmail: say yes to the whole internet, and never lose a messageHow an email service for 1.5 billion mailboxes works: an SMTP edge that refuses cheaply and answers 250 OK only after a quorum write in two zones, with message keys for retries and 451 deferrals as backpressure; a filter funnel that treats authentication as identity and lets reputation, content and user reports judge, on a classifier whose move to RETVec raised detection by 38 percent; SPF, DKIM, DMARC alignment and Gmail's 2024 rules for senders of more than 5,000 a day; metadata apart from content-addressed blobs, erasure-coded as they age, with slow purges, cell-by-cell rollouts and an offline copy after the 2011 tape restore; one search index per mailbox; and quotas and receiving limits that defer with temporary failures.4 checkpoints · 24 chapters
  26. #120 · SQ-24Advanced14 min
    Airbnb Stays MarketplaceAirbnb: a marketplace of nine million one-of-a-kind homesHow a stays marketplace with 9 million+ listings and 533 million nights a year works: search leaves that hold every listing's geo cell, a 365-night availability bit array and prices in memory, filtering by place then dates before a retrieve, rank and re-rank funnel and map pins chosen for attention; a unique key per listing-night at Reserve; iCal calendars from other sites polled by risk, diffed by source and refreshed when a guest presses Reserve; Smart Pricing inside the host's range; and guests' money held in a double-entry ledger and paid out the business day after check-in with an idempotency key per payout.4 checkpoints · 22 chapters
  27. #121 · SQ-22Advanced15 min
    Google Maps Routing, Traffic and TilesGoogle Maps: the fastest route on roads that keep changingHow directions, live traffic and the map work for 2 billion monthly users: a road graph partitioned once into cells with a shortcut overlay whose costs are re-customized from live speeds in under a second, phone fixes map-matched into per-segment speeds within about two minutes, arrival times that time each road for when the driver reaches it, and vector tiles named by quadkey under immutable, versioned URLs.4 checkpoints · 23 chapters
  28. #122 · SQ-20Advanced15 min
    Google Docs CollaborationGoogle Docs: two people, one sentence, the same textHow up to 100 people type into the same document and every screen ends up identical: small changes against numbered revisions, operational transformation on one server per document, one change in flight per client, a revision log that is the document, its fence and its history, and composition for long offline sessions.4 checkpoints · 22 chapters
  29. #123 · SQ-31Expert17 min
    DiscordDiscord: seventy thousand online, and a voice channel you can walk intoHow a real-time community platform at Discord's scale works: fan-out that grows with the square of a server's online members; one ordered Elixir process per server, with passive sessions and relays of up to 15,000 sessions doing the fan-out, so a million-online server costs about 67 sends a message; websocket sessions that outlive their sockets and resume from a sequence number behind bounded buffers; presence combined per user and sent only to the member-list rows a client is watching; messages partitioned by channel and 10-day bucket, protected by request coalescing, and moved from 177 Cassandra nodes to 72 ScyllaDB nodes in days, not months; drop-in voice placed on one host per call and joined over a websocket, UDP and an MLS group; per-route rate limits, slowmode and AutoMod for raids; and the 25 March 2026 outage, where recreated calls flooded two single-process supervisors and the fix was to cut demand before adding supply.4 checkpoints · 24 chapters
  30. #124 · SQ-36Expert16 min
    SlackSlack: route by the channel, govern by the organisationHow a workplace messaging platform works at Slack's scale: tens of millions of connected clients and messages delivered across the world in 500 ms; every message stored on its channel's shard before the channel server that owns it on a consistent-hash ring sends one copy per subscribed gateway server; one copy of a shared channel, with each side's own name and privacy; slim boots from the Flannel edge cache; Vitess keyspaces sharded by the key each query uses, and the 2-22-22 incident, where a scatter query was hiding behind a cache; Kafka in front of the Redis job queue for 1.4 billion jobs on the busiest days; notifications decided per member and per device; Solr search filtered by what each person can read; and the first working day of 2021, when a network hub didn't scale in time.4 checkpoints · 24 chapters
  31. #125 · SQ-25Expert13 min
    Dream11 Fantasy SportsDream11: fifteen million people, thirty minutes after the tossHow a fantasy sports platform at IPL scale works: 15.01 million concurrent users and 308 million requests a minute, with joins and team edits packed into the 30 minutes between the toss and the deadline; capacity forecast days ahead and added an hour before, with tiered load shedding that protects team saves and joins; mega contests that take spots from sharded counters so they can't be oversold, and templates that keep small contests open; a deadline that is one state flip checked atomically by every write; live points recomputed from versioned ball records for each distinct lineup; exact ranks from half-point histograms with ties sharing a rank; and keyed ledger postings for prizes, refunds and withdrawals with 30% tax deducted on net winnings.4 checkpoints · 21 chapters
  32. #126 · SQ-23Expert14 min
    Zoom Video Meetings at ScaleZoom: fourteen people, three continents, one roomHow video meetings work for 300 million daily meeting participants: a small, ordered control plane with one controller per meeting, kept apart from a media plane of routers that forward packets without decoding them, senders that send layers so each router can pick one per receiver from its bandwidth estimate, UDP with forward error correction, resends and jitter buffers and TLS on 443 through firewalls, and participants placed in their nearest zone with routers cascading across regions.4 checkpoints · 23 chapters
  33. #127 · SQ-29Expert16 min
    GitHubGitHub: a billion repositories, and a push that lands on a majority or not at allHow a code host at GitHub's scale works: a billion repositories on five replicas each, where Spokes accepts a reference update only when a strict majority applies it with matching checksums, so there is no primary to fail over; a 2026 move, now rolling out, from a repository-wide lock to a quorum per reference, with Azure Blob Storage as a virtual replica next; reads sent to the nearest in-sync replica and fileservers drained before reboots; one Kafka event per push fanned out to consumers with their own retry rules; webhooks with a 10-second timeout, per-host isolation and delivery ids; 124 million Actions jobs a day on fresh VMs with per-account queues, fair share and leases with epochs; and code search sharded by Git blob id, with permissions checked twice.4 checkpoints · 24 chapters
  34. #128 · SQ-30Expert17 min
    TikTok's For You FeedTikTok's For You feed: learning from every swipe within minutesHow a short-video For You feed can learn from every swipe: more than a billion people a month (TikTok, 2021) and, on stated assumptions, about a million impressions a second at peak, each one a label; watch time judged against videos of the same length, with quick skips as strong negatives; the exact features served logged and joined with labels in a streaming joiner, with late labels waiting on disk and a log odds correction for sampled negatives, as in ByteDance's Monolith paper; collisionless embedding tables with admission and expiry; touched rows synced to serving every minute and dense weights daily; new videos given staged exposure on evidence, not followers; and a re-rank that keeps TikTok's published diversity rules. An illustrative design: TikTok hasn't published its architecture, and ByteDance's papers don't name TikTok.4 checkpoints · 24 chapters
  35. #129 · SQ-32Expert16 min
    ONDCONDC: one order, four companies, no shared databaseHow an open commerce network works when buyer apps, seller apps and couriers are different companies with no shared database: 500 million transactions by 25 July 2026 and 218 million in FY 2025–26, but the load is search, so buyer apps cache catalogues and seller apps check live stock at select; every message signed against a registry whose /lookup limit is a recommended 7,600 a minute; an order named by the buyer app, idempotent confirms, and ONDC's hold-then-release rule with 999 and 998 cancellations for every silence; logistics as a second transaction the seller app orchestrates; settlement that moves money only when both sides' instructions match; and complaints that cross three companies with 48-hour and 30-day deadlines.4 checkpoints · 24 chapters
  36. #130 · SQ-33Expert16 min
    NSE Stock ExchangeNSE: five million messages a second, and one line that decides who was firstHow a stock exchange's trading core works at NSE scale: 21.89 billion order messages and 201 million trades on 24 March 2026, against a published capacity of about 5 million messages a second; one sequencer and one deterministic matching thread per partition, so the sequence number decides who was first and time enters as an event, as in the pre-open auction's random close; output gating so nothing acknowledged is lost when a primary dies; per-connection rates at the gateways and margin as a status bit from NSE Clearing; replay by sequence after a dropped session; multicast tick-by-tick feeds with two channels per stream, and what the co-location case taught about fair delivery; and February 2021, when the trading system was fine and the market still halted because the risk system wasn't.4 checkpoints · 24 chapters

Interview problems20 lectures · 282 min

  1. #131 · IP-01Intermediate14 min
    Design a URL ShortenerURL shortener: seven characters, every decision showingOne strong interview answer to "design bit.ly": a read-path problem with a tiny write path, codes from leased ID blocks scrambled and base-62 encoded, 302 redirects made cheap with cache-aside, negative caching and async click counts, and what to do when Redis or the allocator fails.4 checkpoints · 20 chapters
  2. #132 · IP-02Intermediate14 min
    Design a Rate LimiterRate limiter: a counter, a clock and a decision in 2 msOne strong interview answer to "design a rate limiter": a sliding window counter in Redis, checked and incremented in one atomic script, shared by 40 gateways; a local deny cache so one abusive client can't melt its shard; and failing open so a limiter outage never becomes an API outage.4 checkpoints · 20 chapters
  3. #133 · IP-03Advanced14 min
    Design a Distributed Key-Value StoreKey-value store: two calls, and everything behind themOne strong interview answer to "design a distributed key-value store": a hash ring with virtual nodes for placement, R + W > N quorums tuned per request, sloppy quorums and hinted handoff to stay writable, vector clocks so two carts merge instead of losing an item, and the tombstones that stop deletes coming back.4 checkpoints · 22 chapters
  4. #134 · IP-04Intermediate14 min
    Design a Unique ID GeneratorUnique IDs: 64 bits, a million a second, no two alikeOne strong interview answer to "design a unique ID generator": a Snowflake-style 64-bit layout of time, worker and sequence built inside each service with no network call, worker IDs held as etcd leases so no two instances share one, and what to do when a clock goes backwards, a VM wakes up late, or a browser rounds your ID.4 checkpoints · 21 chapters
  5. #135 · IP-05Advanced14 min
    Design a Web CrawlerWeb crawler: a billion pages, politely, without getting lostOne strong interview answer to "design a web crawler": a two-layer frontier where priority decides what to fetch and per-host queues decide when, URL normalisation and a 12 GB Bloom filter for the seen set, SimHash for near-duplicate pages, defences against spider traps, and the robots.txt and lease rules that keep it polite and robust.4 checkpoints · 22 chapters
  6. #136 · IP-06Intermediate14 min
    Design a Notification SystemNotifications: the OTP never waits behind the saleOne strong interview answer to "design a notification system": one send API that stores and queues atomically with an outbox, a router that applies preferences and quiet hours, at-least-once delivery made harmless with idempotency and dedupe keys, breakers and backup providers, and high and bulk paths isolated at every stage so a 50 million message campaign never delays a login code.4 checkpoints · 21 chapters
  7. #137 · IP-07Intermediate14 min
    Design a News FeedNews feed: push it, pull it, or both?One strong interview answer to "design a news feed": fan-out on write for ordinary authors, pull for celebrities above a follower threshold, feeds that hold only post IDs while each post object lives once, cursor pagination that stays correct while new posts arrive, a 200 ms read path, and how to survive a lost cache shard or a celebrity hot key.4 checkpoints · 20 chapters
  8. #138 · IP-08Advanced14 min
    Design a Chat SystemChat: ten million open sockets, and two ticksOne strong interview answer to "design a chat system": stateful WebSocket gateways in front of a stateless chat service, a per-conversation sequence number that orders every device, a sent tick only after the message is stored, client message IDs that make retries harmless, a session registry that finds Bob's gateways, catch-up by sequence, and how to restart 200 stateful servers without a reconnect storm.4 checkpoints · 20 chapters
  9. #139 · IP-09Intermediate14 min
    Design Typeahead Search (Autocomplete)Typeahead: ten suggestions before the next keystrokeOne strong interview answer to "design typeahead search": two systems in one, an online path that does a single in-memory lookup from a replicated 10 GB snapshot, and an offline path that ranks queries by decayed popularity and hourly trends, filters them, and precomputes the top ten for every prefix; plus the client tricks, the CDN, and how to ship a snapshot safely.4 checkpoints · 21 chapters
  10. #140 · IP-10Advanced14 min
    Design a File Sync Service (Dropbox / Google Drive)File sync: upload only what changed, never lose an editOne strong interview answer to "design Dropbox": files split into hashed chunks stored once in an object store, a strongly consistent metadata service that commits only after every chunk exists, a journal and cursors so any device catches up with one question, content-defined chunks for insertions, and optimistic concurrency that turns two offline edits into a conflicted copy instead of a lost one.4 checkpoints · 22 chapters
  11. #141 · IP-11Advanced16 min
    Design a Distributed CacheDistributed cache: where every key livesOne strong interview answer to "build the thing Redis Cluster is": memory sizing to 20 shards, 16,384 fixed hash slots instead of mod N, smart clients with one hop, hot-key defences from a local L1 to split keys, single flight on expiry, and what breaks on failover, split brain, races and cold restarts.4 checkpoints · 28 chapters
  12. #142 · IP-12Intermediate14 min
    Design PastebinPastebin: unguessable links that vanish on timeOne strong interview answer to "design Pastebin": tiny traffic but terabytes of blobs, metadata in PostgreSQL and content in S3, random 8-character IDs with insert-if-absent, the CDN for immutable pastes, and expiry made exact by a read-time check, capped TTLs, a sweeper and purges.4 checkpoints · 25 chapters
  13. #143 · IP-13Advanced14 min
    Design a Proximity ServiceProximity service: turning near into a lookupOne strong interview answer to "show me coffee shops within 2 km": a huge stale-ok read path split from a tiny write path, a 10 GB geo index replicated rather than sharded, geohash cells with a 9-cell search that beats the boundary problem, caching by cell, and freshness by change stream plus a nightly rebuild.4 checkpoints · 26 chapters
  14. #144 · IP-14Intermediate14 min
    Design a Real-Time LeaderboardLeaderboard: your exact rank, liveOne strong interview answer to a live game leaderboard: 5 GB that fits one node, why rank is a count that SQL can't afford and a skip-list sorted set can, packing time into scores for ties, match_id dedupe in a Lua script, sharding by player hash, exact ranks at the top and a histogram for the tail, and rebuilding derived data from Kafka and PostgreSQL.4 checkpoints · 25 chapters
  15. #145 · IP-15Advanced14 min
    Design a Metrics Monitoring and Alerting SystemMetrics monitoring: the system that must not failOne strong interview answer to a Prometheus or Datadog-style platform: 5 million points a second pushed through a gateway into Kafka, series stored as compressed chunks at about 1.5 bytes a point, a label index and tiered rollups, the cardinality trap, and an alerting path of its own with for clauses, grouping and an external watchdog.4 checkpoints · 26 chapters
  16. #146 · IP-16Advanced14 min
    Design an Ad Click Aggregation SystemAd click aggregation: fast, and right enough to billOne strong interview answer to counting a billion ad clicks a day: a Flink stream for minute-fresh dashboards and an hourly Spark recompute for the billed truth, exactly once as a chain from signed click_id to an overwriting sink, event-time windows with watermarks for late clicks, and salted two-stage aggregation for hot ads.4 checkpoints · 24 chapters
  17. #147 · IP-17Advanced14 min
    Design a Distributed Job SchedulerJob scheduler: on time, and harmless when twiceOne strong interview answer to cron as a service: 100 million jobs in 1,024 leased partitions, a fenced conditional claim and an outbox, a timing wheel for the next minute, look-ahead, jitter and fair queues for the top-of-the-hour spike, and an honest at-least-once guarantee made harmless by leases, attempt-number fencing, run keys and misfire policies.4 checkpoints · 25 chapters
  18. #148 · IP-18Expert14 min
    Design a Distributed Message QueueMessage queue: opening the Kafka boxOne strong interview answer to a Kafka-style distributed log: a log rather than a queue so consumer groups share one copy, storage setting the broker count, segments, page cache and zero-copy for throughput, acks=all with two in-sync replicas, high watermarks and epoch-fenced leader elections, and delivery semantics set by when consumers commit.4 checkpoints · 23 chapters
  19. #149 · IP-19Intermediate14 min
    Design a Hotel Reservation SystemHotel reservations: the last room, sold onceOne strong interview answer to hotel bookings: modest traffic on one PostgreSQL, inventory as a count per room type per night, the capacity check inside a conditional UPDATE across all nights, a unique idempotency key against double clicks, and a hold, pay, confirm saga with expiry, a sweeper and compensations for late payments.4 checkpoints · 25 chapters
  20. #150 · IP-20Expert14 min
    Design a Payment SystemPayment system: never twice, never lostOne strong interview answer to a marketplace payment backend: PSP tokens instead of card data, a timeout treated as unknown and resolved with the same idempotency key or a status query, one key per hop and guarded state transitions, state, ledger and outbox in one commit, a double-entry ledger in paise, and daily reconciliation with every provider.4 checkpoints · 24 chapters

Low-level design22 lectures · 312 min

  1. #151 · LLD-01Intermediate16 min
    Design a Parking LotDesign a parking lotThe most-asked machine-coding round, run end to end: the clarifying questions that change the code, the classes and the two strategies (spot choice and pricing), the one lock that stops two gates giving one spot to two cars, the demo that proves it, and follow-ups that land as new classes.4 checkpoints · 26 chapters
  2. #152 · LLD-02Intermediate14 min
    Design an LRU CacheDesign an LRU cacheA bounded cache where get and put are constant time: why a hash map needs a doubly linked list, sentinels, the split between the cache and a pluggable eviction policy, why even get takes the lock, the eviction callback outside it, and follow-ups from LFU to sharding.4 checkpoints · 26 chapters
  3. #153 · LLD-03Advanced14 min
    Design a Rate LimiterDesign a rate limiterThe classes inside an in-process rate limiter: one interface and three algorithms chosen per rule, an injected clock, lazy token refill, the fixed window's boundary flaw, one limiter per key with its own lock, and double-checked creation so a burst of first requests never builds two buckets.4 checkpoints · 27 chapters
  4. #154 · LLD-04Advanced14 min
    Design an Elevator SystemDesign an elevator systemA multi-car elevator controller: hall calls and car calls, why each car runs LOOK instead of press order, stops that remember the direction wanted, a cost-based dispatch strategy, a tick-by-tick simulated morning, one lock with listeners outside it, and follow-ups that land as new strategies.4 checkpoints · 24 chapters
  5. #155 · LLD-05Advanced15 min
    Design a Movie Ticket Booking SystemDesign a movie ticket booking systemSeat holds and bookings for a cinema: why check-then-book races, an all-or-nothing hold with lazy expiry behind a lock seam, the booking life cycle, a 50-thread race for two seats, a late payment that is refunded, an idempotent confirm, and the lock-ordering deadlock to avoid.4 checkpoints · 26 chapters
  6. #156 · LLD-06Advanced14 min
    Design a Bill-Splitting App (Splitwise)Design a bill-splitting appSplitwise-style expense splitting: integer paise and three split strategies that always add up, expenses as facts and balances as consequences, greedy min cash flow from six debts to three payments, a lock or a transaction per write, and a UPI settle-up recorded only once it's paid.4 checkpoints · 26 chapters
  7. #157 · LLD-07Intermediate14 min
    Design a Vending MachineDesign a vending machineThe State pattern done properly: draw the states first, one class per state answering every event, the machine as a context holding data and an escrow, change made from the coins actually in the box (where greedy fails), one lock for many inputs, and follow-ups that are new states.4 checkpoints · 25 chapters
  8. #158 · LLD-08Advanced14 min
    Design a Logging Framework (Pub-Sub)Design a logging frameworkA pub-sub logging library where each pattern has a job: a chain that filters and redacts each record, a bus that fans it out by level and topic, formatters swapped per sink, an async sink that drops and counts instead of blocking, copy-on-write subscribers and isolated sinks.4 checkpoints · 26 chapters
  9. #159 · LLD-09Intermediate15 min
    Design Snake and LadderDesign Snake and LadderA favourite first machine-coding round: one Jump class for snakes and ladders, a board that rejects chains and bad squares before the first roll, dice and end-of-board rules as strategies, a turn loop with the three-sixes rule, and one lock per game so a double tap can't give a player two turns.4 checkpoints · 28 chapters
  10. #160 · LLD-10Advanced14 min
    Design a Chess GameDesign a Chess GamePieces know geometry, the game decides legality: make the move, look at the king, take it back. Castling rights and the en passant square as history, an undo record for every move, checkmate versus stalemate from one question, a lock even for reads, and perft counts that prove it.4 checkpoints · 27 chapters
  11. #161 · LLD-11Intermediate14 min
    Design an ATMDesign an ATMFive states with a guard on every button, a dispenser that plans notes from what is loaded (and where greedy fails), a bank with an idempotent debit and a safe reversal, and a withdrawal ordered so a jam or a lost reply always puts the money back. Plus a blocked card and a joint-account race.4 checkpoints · 27 chapters
  12. #162 · LLD-12Intermediate14 min
    Design a Library Management SystemDesign a Library Management SystemTitles versus copies: loans point at a copy, reservations at a title. A copy's life cycle with a hold shelf, a return that hands the copy to the queue in the same locked step, fines computed from dates by a pluggable policy, an inverted index for search, notifications after the lock, and a month of a small library.4 checkpoints · 26 chapters
  13. #163 · LLD-13Advanced14 min
    Design a Hotel Reservation SystemDesign a Hotel Reservation SystemRooms are sold per night: half-open stays, room types counted per night with rooms assigned at check-in, 15-minute holds released lazily, pricing rules that stack per night, a lock per room type, a late payment that is refunded, and a cancellation policy. Then a 50-guest race for the last deluxe room.4 checkpoints · 27 chapters
  14. #164 · LLD-14Advanced14 min
    Design a Ride-Sharing ServiceDesign a Ride-Sharing ServiceRiders, drivers, matching and fares: a grid of 1 km cells to find nearby drivers, a compare-and-set on the driver so a stale search can't double-book, a strict trip state machine, matching and fares as strategies with surge as a decorator fixed at request time, and 20 riders racing for 3 drivers.4 checkpoints · 27 chapters
  15. #165 · LLD-15Advanced14 min
    Design a Food Delivery AppDesign a Food Delivery AppA one-restaurant cart, an idempotent checkout with a price snapshot and the charge outside the lock, an order state machine that three parties share, the nearest idle partner or a FIFO queue, refunds by stage decided in one locked step, and fifty concurrent cancels that send one refund.4 checkpoints · 26 chapters
  16. #166 · LLD-16Advanced14 min
    Design a Meeting Room SchedulerDesign a Meeting Room SchedulerRoom booking with a half-open overlap test, a sorted calendar per room that finds clashes with two binary searches, a smallest-fit room strategy, recurring series booked all or nothing, invitations sent after the lock, and a 30-thread race for the boardroom.4 checkpoints · 25 chapters
  17. #167 · LLD-17Advanced14 min
    Design an In-Memory File SystemDesign an In-Memory File SystemA file system tree built on the Composite pattern: a directory's size is its children's, paths normalised as text then walked with the error a shell would give, mkdir and mkdir -p, mv's four outcomes and its cycle check, a byte quota checked inside the lock, and one lock for the whole tree.4 checkpoints · 26 chapters
  18. #168 · LLD-18Advanced14 min
    Design a Text Editor with Undo and RedoDesign a Text Editor with Undo and RedoUndo and redo for a text editor: edits as commands that carry their own exact inverse, two stacks with a bounded history, keystrokes grouped into word-sized steps, typing over a selection as one compound step, a new edit clearing redo, and the measured cost of snapshots instead: 5,014,950 characters against 100.4 checkpoints · 26 chapters
  19. #169 · LLD-19Advanced14 min
    Design an Online AuctionDesign an Online AuctionTimed auctions with a five-state life cycle, tiered minimum raises, validate-then-append under a lock per auction, a clock that decides when an auction ends, a two-minute soft close with a lazy deadline heap, idempotent bid ids, events published after the lock, and a 20-thread race for a brass lamp.4 checkpoints · 27 chapters
  20. #170 · LLD-20Expert14 min
    Design a Stock Exchange Order BookDesign a Stock Exchange Order BookA limit order book for one symbol: price-time priority at the resting price, one side built from a dict of levels, a heap of prices and a FIFO per level, partial fills and an order's status, O(1) lazy cancels, every operation's cost, and one matcher thread per symbol fed by a queue, hammered by 8,000 orders from eight threads.3 checkpoints · 25 chapters
  21. #171 · LLD-21Expert14 min
    Design a Task Scheduler with DependenciesDesign a Task Scheduler with DependenciesA dependency-aware task scheduler: Kahn's algorithm rejects a cycle at submit and, as counts of unmet dependencies, releases tasks live; a ready heap by priority and a delayed heap by time behind one condition variable; tasks run outside the lock; doubling backoff for a flaky test; cancels and failures that skip everything downstream; fixed-rate recurring tasks; and 40 tasks on 4 workers.4 checkpoints · 28 chapters
  22. #172 · LLD-22Expert14 min
    Design a Key-Value Store with TTL and TransactionsDesign a Key-Value Store with TTL and TransactionsAn in-memory key-value store: committed data in a locked store and uncommitted writes in each session's stack of transaction layers, versions validated at the outermost commit, lazy expiry on read plus bounded sweeps from a heap of deadlines, eviction behind an interface, and 4,000 increments from eight threads with none lost.4 checkpoints · 27 chapters

Case files12 lectures · 152 min

  1. #173 · CASE-001Intermediate12 min
    The Great Travel Booking Disaster: How 2PC Nearly Killed Our Business and Saga Pattern Saved ItWonderTravel: when two-phase commit met Black FridayHow WonderTravel's one-click flight, hotel and car booking, built on two-phase commit, locked thousands of bookings when its coordinator crashed and split a booking in a network partition, and how a saga of local commits, compensating actions and idempotent retries replaced it.3 checkpoints · 22 chapters
  2. #174 · CASE-002Intermediate11 min
    The Great Video Call Revolution: When WebSockets Met WebRTC and Changed EverythingConnectNow: the night video ran over WebSocketsHow ConnectNow's video calls, relayed frame by frame through a WebSocket server, fell apart before an investor demo, and how a hybrid design fixed it: WebSockets for signalling and chat, WebRTC for media, STUN and TURN for NAT, and SFUs once calls grow.3 checkpoints · 21 chapters
  3. #175 · CASE-003Intermediate11 min
    Handling Node Outages in Leader-Follower Database Replication: A Tale of ResilienceWhen the database leader goes darkThe StreamFlix scenario: what happens when a follower or the leader of a replicated database fails, the failover dance, synchronous vs asynchronous replication by what the data is worth, how PostgreSQL and MongoDB fail over, and the split brain GitHub hit in 2018.3 checkpoints · 22 chapters
  4. #176 · CASE-004Intermediate11 min
    The Silent Cache Poisoning Disaster: When CDN Becomes Your EnemyCDN cache poisoning: someone else's cartThe ShopFast case file: on Black Friday a CDN rule cached /api/* by URL path alone and ignored the origin's private headers, so one user's cart, address and card digits reached others while every backend dashboard stayed green. How it was found, contained and fixed for good.3 checkpoints · 20 chapters
  5. #177 · CASE-005Intermediate11 min
    The Great ID Crisis: When Auto-Increment Hits the Mathematical WallThe 2 AM integer overflowAn event log's 32-bit auto-increment ID reaches 2,147,483,647 after about 18 months at 4 million events a day, and inserts fail silently. Why it stays quiet, the emergency fixes and how to choose, UUID and Snowflake IDs, and how to see the ceiling coming.3 checkpoints · 21 chapters
  6. #178 · CASE-006Intermediate12 min
    Building DIGIPIN: From Chaos to 4-Meter Precision Across India's Digital GeographyDIGIPIN: an address for every 4-metre squareA case study that designs a GeoHash-based location service around DIGIPIN's goal: a 10-character code for every small square of India, worked out from latitude and longitude, served through edge and Redis caches, PostGIS partitioned by state, and three regions that survive a lost database.3 checkpoints · 20 chapters
  7. #179 · CASE-007Intermediate12 min
    Building a Scalable Spam Detection System for User-Submitted URLs Using Bloom FiltersGlobalForum: catching 1.2 billion bad links in 2 GBHow GlobalForum's database-backed spam check collapsed in a 10x traffic spike, and how a Bloom filter, about 2 GB of bits in Redis with no false negatives, answers most link checks without touching the database, stays current through rebuilds, and holds up in an attack.3 checkpoints · 20 chapters
  8. #180 · CASE-008Intermediate14 min
    From Mac Bottleneck to Universal Access: The iOS Bridge StoryiOS Bridge: the simulator on every developer's screenHow I built iOS Bridge, an open-source tool that streams iOS simulators from one Mac to Windows, Linux or a browser: from a choppy screenshot loop to newest-frame-wins WebRTC, click-to-tap mapping, and sessions that survive a server restart.3 checkpoints · 22 chapters
  9. #181 · CASE-009Intermediate15 min
    From Office-Bound Devices to Global Access: The BridgeLink StoryBridgeLink: the phones are on a desk, the developers aren'tHow I turned plain adb and a bore tunnel into BridgeLink, an open-source CLI that makes the Android phones a team already owns reachable from anywhere: a tunnel manager, three-step WiFi, health checks that catch hung devices, and auto-activation that brings a phone back in about two seconds.3 checkpoints · 22 chapters
  10. #182 · CASE-010Intermediate12 min
    The Tatkal Gamble: How India Sells 500 Train Seats to 2 Million People Without a Single MistakeIRCTC Tatkal: 500 seats, 2 million peopleHow a Tatkal rush sells a few hundred seats to about two million people in ten seconds without a double booking: a cheap counter at the door, a waiting room that breathes with the database, hold-then-confirm with automatic refunds, layered bot defences, and why looking and buying must not share servers.3 checkpoints · 20 chapters
  11. #183 · CASE-011Intermediate15 min
    One File, 8.5 Million Blue ScreensCrowdStrike: one file, 8.5 million blue screensHow a 78-minute configuration update, Channel File 291, crashed about 8.5 million Windows machines on 19 July 2024: a 21-field rule against a 20-input sensor in kernel code, a validator that trusted the wrong file, no staged rollout, and machines that couldn't stay up long enough to be fixed.3 checkpoints · 22 chapters
  12. #184 · CASE-013Intermediate16 min
    25.3 Million People, One Cricket Match: Why Hotstar Scaled Before the Star Walked InHotstar: 25.3 million viewers, one matchHow Hotstar served 25.3 million people watching India vs New Zealand at once on 10 July 2019: why reactive autoscaling was too late, the capacity ladder and the scorecard as a forecast, a CDN built as a shock absorber, panic mode, and the thundering herd when the wicket falls.3 checkpoints · 24 chapters