System Design
System Design case studies, papers and concepts.
Each case walks through requirements, estimates, the design and what changes at scale. Papers and concepts explain the ideas the designs rely on.
Case studies
- URL shortenerHash or counter? Base62, collisions, redirect cache, and a 100:1 read-to-write ratio.
- Rate limiterToken bucket, sliding window, and where to put the limiter: client, gateway, or service.
- DICT: token bucket against Pix key scanningShows real parameters, published in a regulation. Individuals: 100 tokens, −1 per valid query, −20 per invalid query, +1 per paid Pix, +2 per minute. Participants: categories A–H. The regulation includes a worked example: a debt balance of 15 tokens leads to an 8-minute wait.
- Layered SLOs: how the BC measures PSP latency and availabilitySplits end-to-end latency into segments (t0'…t6a), each with an owner and a percentile. Targets depend on PSP size: A 99.5%, B 99.0%, C 98.5%, D 95.0%. Failures of SPI, DICT, or RSFN do not count against the PSP.
- Pix key data exposure at a participant (Pefisa, 2025–26)The data was exposed for about 6 months and was only registration data. The exercise is to discuss what anomalous-read detection and auditing would have reduced the blast radius.
- From zero to millions of usersClassic interview design. Key points: capacity estimation.
- Instagram: 14 million users with 3 engineers (Postgres and per-shard IDs)Real production architecture. Key points: unique ID generation and logical vs. physical shards.
- Stack Overflow: a monolith on a few serversReal production architecture. Key points: Horizontal vs Vertical Scaling, Microservices vs Monolith, and Caching Fundamentals.
- GitLab 2017: rm -rf on the primary database and 5 backup methods that failedReal incident. Key points: restore testing.
- PastebinClassic interview design. Key points: TTL expiration and unique ID generation.
- Microsoft Teams 2020: expired certificateReal incident. Key points: time and clocks.
- Design a load balancerClassic interview design. Key points: Load Balancing and Availability Patterns.
- Healthcare.gov 2013: the launch that didn't scaleReal incident. Key points: capacity estimation.
- Spotify Discover Weekly / personalizationReal production architecture. Key points: implicit MF, audio CNN for cold start, and weekly batch.
- Chicisimo: vertical ML in fashionReal production architecture. Key points: data flywheel and domain ontology.
- Moffatt v. Air Canada (2024): chatbot invents a policyReal incident. Key points: hallucination with legal liability, grounding, source citation, and human handoff.
- Cursor (Apr 2025): support bot "Sam" invents a login ruleReal incident. Key points: hallucination in customer support, disclosing that it is an AI, grounding in real policy, and churn impact.
- Chevrolet of Watsonville (Dec 2023): chatbot "sells" a Tahoe for US$ 1Real incident. Key points: prompt injection, domain scope, and output with no contractual authority.
- Microsoft Tay (2016)Real incident. Key points: online learning with untrusted input and data poisoning.
- Samsung (May 2023): code leaks to ChatGPTReal incident. Key points: DLP for LLMs, corporate gateway, and self-hosted vs SaaS.
- Mata v. Avianca (2023): invented case lawReal incident. Key points: hallucinated citations and human in the loop.
- Unique ID generatorUUID, ticket server, or Snowflake: ordering, clocks, and coordination between nodes.
- News feedFan-out on write vs. on read, the celebrity problem, and timeline caching.
- AutocompleteTrie with top-k, search data collection, and offline index updates.
- Real-time chatPersistent connections, online presence, message ordering, and offline delivery.
- Discord: trillions of messagesHot partitions, GC pauses, and the migration from Cassandra to ScyllaDB with a Rust data service.
- Cloudflare: a regex exhausts the CPUA WAF rule with backtracking hit the entire network at once. What the rollout was missing.
- The "always-fresh" cache: balance via event sourcing without blowing up memoryThe problem is concrete: any instance served any customer, so each one held about 100 GB and suffered GC pauses. The solution uses the key account-id + event-counter, with the counter incremented in the same transaction. The case explains why the global basis-t was rejected.
- iFood: from 1 million orders a month to events for 60 thousand restaurantsEvolution with public numbers: reactive microservices in 2017 and, in 2019, the move from Lambda and DynamoDB Streams to Kubernetes. Good for discussing the limits of serverless.
- The 2020 Valentine's Day outage and the turn to chaos engineeringThe company lays out the sequence: the outage, then fallbacks and circuit breakers, then manual game days, and finally LitmusChaos. It teaches how to prove a fallback works before the next peak.
- Mercado Livre Fury: from the Oracle monolith to about 30 thousand deploys a dayThree well-defined eras: monolith in 1999, MeliCloud, and Fury in 2015. Shows that microservices without a platform create chaos.
- KVS: key-value as a platform product (642 million operations per minute)A single "KV" becomes a family of services with different guarantees (Database, Cache, counters, Vault, QKVS). Teaches how to choose consistency per use case.
- Magalu: 113 applications migrated before Black Friday 2018The business problem is concrete: from 50 thousand to 4.3 million SKUs, with an API gateway decoupling front end and back end.
- Distributed web crawlerClassic interview design. Key points: probabilistic data structures, job scheduling, and politeness and robots.txt.
- Proximity service (Yelp)Classic interview design. Key points: geospatial indexing.
- Real-time game leaderboardClassic interview design. Key points: rankings and leaderboards.
- Photo sharing (Instagram/Flickr)Classic interview design. Key points: blob and video delivery and feed fan-out.
- Distributed cache (Memcached/Redis)Classic interview design. Key points: consistent hashing and hot keys.
- Ticket sales for a major event (Ticketmaster)Classic interview design. Key points: reservations and concurrency, and overload control.
- Twitter: timelines at scale (fan-out in Redis)Real production architecture. Key points: feed fan-out.
- WhatsApp: 2 million connections per server (Erlang/FreeBSD)Real production architecture. Key points: WebSocket and presence.
- Pinterest: sharding the MySQL fleetReal production architecture. Key points: unique ID generation.
- Netflix: what happens when you press play (Open Connect)Real production architecture. Key points: blob and video delivery.
- Slack: real-time messaging (gateways, channel servers, Flannel)Real production architecture. Key points: WebSocket and presence and consistent hashing.
- AWS S3 2017: one mistyped commandReal incident. Key points: progressive deploys and cell-based architecture.
- Knight Capital 2012: more than US$ 460 million lost in 45 minutes (SEC)Real incident. Key points: incomplete deploy on 1 of 8 servers, feature flag reuse, no kill switch, and progressive deployment.
- CrowdStrike 2024: Channel File 291 takes down 8.5 million machinesReal incident. Key points: progressive deploys and cell-based architecture.
- Fastly 2021: a valid customer configuration triggers a latent bugReal incident. Key points: progressive deployment.
- Atlassian 2022: deletion script takes down 775 customers (883 sites) for up to 14 daysReal incident. Key points: soft delete vs hard delete, per-tenant restore, and no customer lost more than 5 min of data.
- Design a CDNClassic interview design. Key points: networking: DNS and BGP.
- Short-video feed (TikTok)Classic interview design. Key points: blob and video delivery.
- Music streaming (Spotify)Classic interview design. Key points: blob and video delivery.
- Matching app (Tinder)Classic interview design. Key points: probabilistic data structures and geospatial indexing.
- Online judge (LeetCode)Classic interview design. Key points: sandbox, job scheduling, and rankings and leaderboards.
- Online auction (eBay)Classic interview design. Key points: reservations and concurrency, and WebSocket and presence.
- E-commerce: catalog, cart, and checkoutClassic interview design. Key points: reservations and concurrency.
- Authentication (session, JWT, OAuth/OIDC)Classic interview design. Key points: authentication and authorization.
- Stripe: scaling the API with rate limitersReal production architecture. Key points: rate limiting algorithms and overload control.
- Prime Video: from serverless microservices to a monolith (90% lower cost)Real production architecture. Key points: Microservices vs. Monolith, Serverless Architecture, and Cost Optimization at Scale.
- Segment: goodbye, microservicesReal production architecture. Key points: Microservices vs Monolith and Message Queues.
- Uber: why it switched from Postgres to MySQLReal production architecture. Key points: storage engines (LSM) and online data migration.
- YouTube: scaling MySQL with VitessReal production architecture. Key points: Database Sharding and Database Selection.
- Leap seconds: 2012 (Reddit, LinkedIn, Linux kernel) and Cloudflare 2017 (DNS)Real incident. Key points: time and clocks.
- Distributed counter (celebrity likes and views)Classic interview design. Key points: hot key and sharded counters, and job scheduling.
- Shopify: modular monolith (Deconstructing the Monolith)Real production architecture. Key points: component boundaries and static dependency checking.
- OpenAI: a single Postgres primary for 800 million ChatGPT usersReal production architecture. Key points: read replicas and workload isolation instead of sharding.
- Pokémon GO 2016: 50x the expected traffic at launchReal production architecture. Key points: capacity estimation.
- Netflix: 7 years to leave the data center (2008–2016)Real production architecture. Key points: online data migration.
- Ticketmaster/Taylor Swift 2022: 3.5 billion requests, 4x the previous peakReal incident. Key points: overload control and reservations and concurrency.
- News aggregator (Google News)Classic interview design. Key points: probabilistic data structures.
- Financial aggregator (Mint)Classic interview design. Key points: Data Pipelines and Message Queues.
- Social graph: degrees of separationClassic interview design. Key points: Database Sharding and Data Modeling Fundamentals.
- Facebook timelineClassic interview design. Key points: Data Modeling Fundamentals and Database Sharding.
- Reddit (votes, "hot" ranking, comments)Classic interview design. Key points: rankings and leaderboards.
- Canva: 50 million uploads per dayReal production architecture. Key points: blob and video delivery.
- Discord: Elixir with 5 million concurrent usersReal production architecture. Key points: WebSocket and presence and consistent hashing.
- Discord: from Go to Rust (GC spikes)Real production architecture. Key points: GC pauses.
- Twitter: Redis with 105 TB of RAMReal production architecture. Key points: Caching Fundamentals and Database Sharding.
- Amazon: from monolith to SOAReal production architecture. Key points: Microservices vs. Monolith and Domain-Driven Design.
- Netflix: Linux performance analysis in 60 sReal production architecture. Key points: Monitoring and Observability and Performance Antipatterns.
- Cloudflare Jul 2020: backbone sends all traffic to AtlantaReal incident. Key points: network: DNS and BGP.
- Price tracker (CamelCamelCamel)Classic interview design. Key points: job scheduling and price alerts.
- Fitness activity app (Strava)Classic interview design. Key points: geospatial indexing and rankings and leaderboards.
- Online chess (matchmaking and real-time state)Classic interview design. Key points: WebSocket and presence and rating-based matchmaking.
- Webhook delivery (retries, signing, DLQ)Classic interview design. Key points: job scheduling and rate limiting algorithms.
- Design an API gatewayClassic interview design. Key points: rate limiting algorithms and authentication and authorization.
- Q&A platform (Quora)Classic interview design. Key points: answer ranking and feed fan-out.
- Ailo: LLM recommendation agent (16 s and nondeterminism)An honest failure (the "cookie" shown to someone who ordered a hamburger, due to a taxonomy error), 16 s or more of latency, and two fixes. The bottleneck was the data, not the model.
- Visual searchClassic interview design. Key points: embeddings, contrastive learning, ANN index, and MRR/recall@k.
- Blurring in Google Street ViewClassic interview design. Key points: object detection, NMS, mAP/IoU, and offline batch inference.
- YouTube video searchClassic interview design. Key points: multimodal embeddings, inverted index fusion with ANN, and reranking.
- Event recommendationClassic interview design. Key points: learning to rank, geo/time features, and cold start for ephemeral items.
- Similar listings on vacation rental platformsClassic interview design. Key points: session-based item2vec, negative sampling, ANN, and real-time personalization.
- Gmail Smart ComposeClassic interview design. Key points: autoregressive LM, latency under 100 ms, beam search, and acceptance rate.
- Google TranslateClassic interview design. Key points: encoder-decoder, BPE/SentencePiece, BLEU, and language detection.
- Image captioningClassic interview design. Key points: visual encoder + text decoder, cross-attention, and CIDEr.
- Search rankingClassic interview design. Key points: query understanding, multistage LTR, and nDCG.
- Fraud detectionClassic interview design. Key points: extreme imbalance, delayed labels, and cost-sensitive thresholds.
- Delivery time estimation (ETA)Classic interview design. Key points: regression, quantile loss, and real-time features.
- Speech recognition (ASR)Classic interview design. Key points: WER and streaming inference.
- Autocomplete with MLClassic interview design. Key points: LM + trie, latency budget, and personalization.
- Game recommendationClassic interview design. Key points: collaborative filtering and implicit feedback.
- Google Wide & Deep (Google Play)Real production architecture. Key points: memorization vs. generalization, cross features, and low-latency serving.
- Amazon item-to-item CFReal production architecture. Key points: item-item similarity and offline precomputation.
- Lyft: fraud, from shallow to deepReal production architecture. Key points: LR → GBDT → DL evolution and precision at fixed recall.
- Dropbox OCR pipelineReal production architecture. Key points: synthetic data, CNN-LSTM-CTC, and buy vs build.
- Hidden Technical Debt in ML Systems (Google)Real production architecture. Key points: ML technical debt, glue code, feedback loops, and rules of ML.
- Airbnb: home valuationReal production architecture. Key points: zipline, from prototype to production, and bighead.
- Instacart: shopper routingReal production architecture. Key points: learned layout and ML + operations research.
- Netflix MetaflowReal production architecture. Key points: ML workflow orchestration and versioning.
- Nubank: real-time ML alerts and automatic retrainingReal production architecture. Key points: drift alerts and retraining pipelines.
- iFood: recommendation and inference platformReal production architecture. Key points: pre-indexing predictions + real-time data, hundreds of models, and high availability.
- ChatGPT 3/20/2023: redis-py bug exposes other users' dataReal incident. Key points: pool corruption on a canceled request and data-owner check.
- Gemini (Feb 2024): image generation pausedReal incident. Key points: side effect of prompt rewriting, over-refusal, and kill switch.
- Grok (Jul 2025): system prompt change produces antisemitic posts for 16 hReal incident. Key points: change management on prompts, evaluation before deploy, rollback, and kill switch.
- Bing Chat "Sydney" (Feb 2023)Real incident. Key points: long-context drift, system prompt leakage, and turn limit.
- AI Overviews (May 2024): "glue on pizza"Real incident. Key points: RAG with untrusted sources, satire detection, and when not to answer.
- Zillow Offers (2021): pricing model leads to the shutdown of the businessReal incident. Key points: concept drift, uncertainty, and the loop between model and market.
- Amazon (2018): recruiting AI penalizes womenReal incident. Key points: historical bias in labels, protected-attribute proxies, and fairness audit.
- Google Photos: racist labelingReal incident. Key points: bias in training data and label blocklist as a mitigation.
- IB 2020: model-predicted gradesReal incident. Key points: high-impact automated decisions and lack of ground truth.
- UK police (NDAS): bug inflates accuracyReal incident. Key points: data leakage and model validation.
- Distributed key-value storePartitioning, replication, quorum, vector clocks, and gossip-based failure detection.
- Notification systemPer-channel queues, retries, deduplication, and user preferences.
- Payment systemEnd-to-end idempotency, reconciliation, and consistency between ledger and PSP.
- GitHub: 43 seconds of partition, 24 h degradedA short partition triggered a failover between data centers and left divergent writes to reconcile.
- A bank on an immutable database: Datomic, Clojure, and Kafka at the core of NubankThe audit domain justifies every choice: replay with offset reset, point-in-time queries, the "diplomat architecture", and standardizing the stack when growing from 50 to over 600 engineers.
- Sharding by customer and the shard 1 that grew too largeA documented decision and debt: shard 1 concentrated the early adopters. Later came the AWS account split and a quota ETL. Good for "choose the shard key" and "estimate what breaks first".
- Real-time fraud prevention on Pix: DAG, rules, and ML at NubankLatency budget against decision quality, with numbers: more than 40 processes per Pix and 550 → about 350 ms in complex flows. Includes shadow testing of rules.
- Attack on a connectivity provider (PSTI) and the hardening of PixAn intermediary becomes a single point of compromise for several institutions. The central bank's measures become design requirements: a R$15 thousand cap and alerts and blocking of the PI Account.
- Real-time dispatch: order, courier, and kitchen timeIt is the real counterpart of case_food_delivery. "Nearest" is not enough: it batches only if no order is delayed, the vehicle depends on weight and distance, phone battery counts, and dispatch depends on predicted kitchen time.
- Mercado Envios: from a single MySQL for Latin America to cellsIt is the best Brazilian case for senior. How to route without a cell key in the API: broadcast for legacy entities (404 from all cells = "does not exist") and ID ranges per cell for new entities. p95/p99 dropped about 70%.
- Mercado Pago digital account: TCC reservations and moving off the relational databaseRare numbers in payments: the table grew from 12 TB to 100 TB, with about 700 million rows per day, days away from the datafile limit. Hot-account protection with preventive synchronization from 500 reservations. They accepted +33% average latency in exchange for stable percentiles.
- Internal traffic: from the "central airport" to sidecar, mTLS, and IstioThe airport metaphor works in the classroom: passport = authentication, immigration = authorization. Over 100 thousand routes in a "central notebook" and identity evolving from token to JWT and then mTLS.
- Fury Streams: distributing permits so the destination doesn't go downClassic exercise with real context: a 100k RPM destination and more than 800 ephemeral instances. An equal split of permits processes only 70k; the second iteration distributes by actual usage.
- VTEX Jul 12, 2023: circuit breakers that don't close on their ownThe resilience mechanism itself extended the incident: the database was fixed at 21:15 UTC, but the breakers stayed open until 23:03.
- VTEX 07/13/2023: rollback doesn't stop the cascade and disaster recovery is neededThe rollback came in 12 min, but the cascade had already spread. Almost half of the sessions and orders worldwide were affected, part of the infrastructure was rebuilt, and one of the actions is a centralized cache flush.
- QuintoAndar: customer data, from Lambda architecture to a single path in ClickHouseA real case of simplification: hot path (Postgres "Datazord") plus cold path (expensive Kafka Connect and Delta with MERGE) become an event gateway writing straight to ClickHouse.
- Globo.com: live video for the World Cup and BBBIt is the huge, predictable Brazilian peak. Real variant of case_live_streaming.
- Video platform (YouTube/Netflix)Classic interview design. Key points: blob and video delivery.
- File sync (Google Drive/Dropbox)Classic interview design. Key points: blob and video delivery and collaborative editing.
- Nearby friendsClassic interview design. Key points: WebSocket and presence, and geospatial indexing.
- Google Maps (tiles, routes, ETA)Classic interview design. Key points: geospatial indexing.
- Distributed message queue (Kafka-style)Classic interview design. Key points: storage engines (LSM).
- Metrics monitoring and alertingClassic interview design. Key points: Time-Series Data, Monitoring and Observability, and Data Pipelines.
- Hotel booking (Booking/Airbnb)Classic interview design. Key points: reservations and concurrency.
- Distributed email service (Gmail)Classic interview design. Key points: blob and video delivery, and SMTP/IMAP.
- Ride-hailing app (Uber)Classic interview design. Key points: geospatial indexing, WebSocket and presence, and distributed locks.
- Collaborative editor (Google Docs)Classic interview design. Key points: collaborative editing, WebSocket, and presence.
- Distributed task schedulerClassic interview design. Key points: job scheduling and distributed locks.
- Amazon Dynamo and Cassandra: the leaderless KV storeReal production architecture. Key points: consistent hashing and leaderless replication.
- LinkedIn: the log and the birth of KafkaReal production architecture. Key points: storage engines (LSM).
- Netflix: circuit breakers and cascading failure (Hystrix)Real production architecture. Key points: hystrix in maintenance since 2018 and the pattern remains valid, and the cited successor is Resilience4j.
- Stripe: predictable APIs with idempotency keysReal production architecture. Key points: Idempotent Operations, API Design Fundamentals, and Cloud Design Patterns.
- Cloudflare Nov 2025: features file doubles in size and the proxy panicsReal incident. Key points: progressive deployment.
- AWS Kinesis 2020: OS thread limit after adding capacityReal incident. Key points: cell-based architecture and overload control.
- Slack Jan 2021: the network gateway (AWS Transit Gateway) that did not scale when everyone returned from vacationReal incident. Key points: saturated TGW drops packets, CPU-based autoscaling shuts down servers stuck on I/O and then tries to bring up 1,200 at once, and overload control.
- Post and web search (Twitter/FB search, Google)Classic interview design. Key points: Search Systems, Database Sharding, and Data Pipelines.
- OpenAI Dec 2024: telemetry service takes down the Kubernetes control plane and DNSReal incident. Key points: cell-based architecture and progressive deployment.
- Flash saleClassic interview design. Key points: reservations and concurrency, and overload control.
- Live comments (Facebook Live)Classic interview design. Key points: WebSocket and presence.
- Distributed loggingClassic interview design. Key points: Monitoring and Observability, Data Pipelines, and Search Systems.
- Food delivery and fast local delivery (iFood/DoorDash/Gopuff)Classic interview design. Key points: geospatial indexing.
- Video conferencing (Zoom)Classic interview design. Key points: WebRTC and SFU vs MCU and WebSocket and presence.
- Distributed lock serviceClassic interview design. Key points: distributed locks.
- Code deployment systemClassic interview design. Key points: progressive deployment.
- Netflix EVCache: memcached replicated across regionsReal production architecture. Key points: Caching Fundamentals and Multi-Region Architecture.
- Netflix Zuul 2: asynchronous gatewayReal production architecture. Key points: WebSocket and presence.
- Slack: scaling datastores with VitessReal production architecture. Key points: online data migration.
- Airbnb: preventing double payments (Orpheus)Real production architecture. Key points: Idempotent Operations and Distributed Transactions.
- Figma: how multiplayer worksReal production architecture. Key points: collaborative editing.
- Figma and Notion: horizontal sharding of PostgresReal production architecture. Key points: online data migration.
- Stripe: online migrations at scaleReal production architecture. Key points: online data migration.
- Lyft Envoy and the birth of the service meshReal production architecture. Key points: service discovery and mesh.
- GitHub 2012: failover promotes a lagging replicaReal incident. Key points: Consensus Algorithms, Availability Patterns, and Consistency Patterns.
- Azure AD Mar 2021: rotation removes signing keyReal incident. Key points: authentication and authorization and progressive deploys.
- Datadog Mar 2023: automatic systemd update wipes out routesReal incident. Key points: progressive deployment.
- Live streaming (Twitch)Classic interview design. Key points: blob and video delivery, and WebSocket and presence.
- AWS: cells and shuffle sharding (Builders' Library)Real production architecture. Key points: cell-based architecture.
- Dropbox Nucleus: sync engine rewritten in RustReal production architecture. Key points: deterministic testing.
- Uber Schemaless: datastore on top of MySQLReal production architecture. Key points: storage engines (LSM).
- Uber DOMA: domain-oriented microservicesReal production architecture. Key points: Microservices vs. Monolith and Domain-Driven Design.
- Google Dapper: distributed tracingReal production architecture. Key points: Monitoring and Observability.
- Cloudflare Pingora: replacing NGINX with RustReal production architecture. Key points: Load Balancing and Performance Anti-Patterns.
- Heroku/Travis 2022: stolen OAuth tokensReal incident. Key points: authentication and authorization.
- Reddit Pi Day 2023: Kubernetes upgrade breaks CalicoReal incident. Key points: progressive deployment.
- Cloudbleed 2017: parser leaks memory through the CDN edgeReal incident. Key points: memory bug in parser and purge of third-party caches.
- TSB 2018: the core banking migration that failedReal incident. Key points: online data migration.
- iFood: real-time feature platform for anti-fraud (250 → 50 ms)The "Two Step Aggregator" builds large windows out of small steps. The scientist defines the what and the platform solves the how.
- Mercado Livre: training-serving skew and data dependencies in anti-fraudMemorable heuristic: the chance of consistency is about 1/2^N sources.
- Harmful content detectionClassic interview design. Key points: multimodal fusion, multi-task, imbalance, human review queue, and adversarial drift.
- Video recommendationClassic interview design. Key points: candidate generation + ranking, two-tower, implicit feedback, cold start, and A/B.
- Ad click prediction on social networksClassic interview design. Key points: feature crossing, DCN, calibration, NE, continuous training, and delayed labels.
- Personalized news feedClassic interview design. Key points: multi-task engagement, weighted score, and freshness and diversity.
- People You May KnowClassic interview design. Key points: link prediction, GNN, friends of friends, batch precomputation, and fairness.
- ChatGPT: personal assistant chatbotClassic interview design. Key points: pretraining → SFT → RLHF, KV cache, batching, guardrails, and conversation memory.
- Retrieval-Augmented GenerationClassic interview design. Key points: chunking, hybrid search, reranking, grounding, faithfulness evaluation, and ACL.
- Realistic face generationClassic interview design. Key points: GAN/StyleGAN, mode collapse, FID, and watermarking.
- Text-to-imageClassic interview design. Key points: latent diffusion, CFG, steps vs latency, CLIP score, and safety filters.
- Personalized headshotClassic interview design. Key points: DreamBooth/LoRA, per-user training, GPU scheduling, and consent.
- Bot detectionClassic interview design. Key points: behavioral features, adversarial drift, and graph signals.
- Text-to-speech (ElevenLabs-style)Classic interview design. Key points: vocoder, voice cloning, streaming, and MOS.
- Code assistant (Copilot-style)Classic interview design. Key points: FIM, repository context under a token budget, autocomplete latency, and acceptance rate.
- Customer support agent with LLM and toolsClassic interview design. Key points: RAG + tool calling, action permissions, human handoff, and agent evaluation.
- Self-driving vehicle perceptionClassic interview design. Key points: semantic segmentation, sensor labeling, and critical safety evaluation.
- Entity linkingClassic interview design. Key points: NER, disambiguation, and knowledge base.
- Dynamic pricingClassic interview design. Key points: price elasticity, bandits, and feedback loops.
- Place feed for a new city (Meta, L5)Classic interview design. Key points: geographic candidates and user cold start.
- Uber Michelangelo (ML platform → GenAI)Real production architecture. Key points: feature store (Palette), training-serving consistency, and model registry.
- YouTube DNN Recommendations (2016)Real production architecture. Key points: candidate generation as extreme classification, expected watch time, and example age.
- Twitter/X recommendation algorithm (open source)Real production architecture. Key points: in-network/out-of-network, SimClusters, heavy ranker, and home-mixer.
- Netflix: personalized rows, RecSysOps, and foundation modelReal production architecture. Key points: page personalization, gap between offline and online metrics, and foundation model for recsys.
- Netflix: artwork personalization (contextual bandits)Real production architecture. Key points: contextual bandits, exploration vs. exploitation, and offline evaluation by replay.
- Instagram ExploreReal production architecture. Key points: two towers, early/late stage ranking, ig2vec, and integrity filters.
- Embedding-based retrieval in Facebook searchReal production architecture. Key points: two-tower, hard negatives, and hybrid ANN with term matching.
- Airbnb search ranking (GBDT → DL, Experiences)Real production architecture. Key points: LTR in a two-sided marketplace, position bias, and simplicity first.
- Booking.com: 150 models, 6 lessonsReal production architecture. Key points: offline metric does not predict business impact, and A/B as the source of truth.
- Stripe Radar (payment fraud)Real production architecture. Key points: network of signals across merchants, decision in under 100 ms, explainability, and rules + ML.
- Uber DeepETAReal production architecture. Key points: residual over the routing engine, linear transformer, and asymmetric loss.
- Netflix: ML for streaming qualityReal production architecture. Key points: network prediction, ABR, and predictive prefetch.
- LinkedIn: building a GenAI productReal production architecture. Key points: agent routing, structured output, evaluation guide, and streaming.
- Anthropic Contextual RetrievalReal production architecture. Key points: contextualized chunks, BM25 + embeddings, and prompt caching.
- Netflix Kayenta (automated canary)Real production architecture. Key points: statistical comparison between baseline and canary.
- Feature stores: Feast (Gojek) and Feathr (LinkedIn)Real production architecture. Key points: point-in-time joins and training-serving skew.
- Google ScaNNReal production architecture. Key points: anisotropic quantization and recall vs latency.
- Cloudflare bot management MLReal production architecture. Key points: edge inference and heuristic + ML layers.
- LinkedIn feed (two passes, dwell time, LLM in 2026)Real production architecture. Key points: first pass/second pass, dwell time, and multi-objective.
- DoorDash Sibyl (prediction service)Real production architecture. Key points: central prediction service, redis as feature store, and shadow mode.
- Shortwave: email assistant with RAGReal production architecture. Key points: tool selection, query rewriting, and context budget.
- Anthropic: multi-agent research systemReal production architecture. Key points: orchestrator and workers, parallel calls, and agent evaluation.
- GitHub Copilot: context assemblyReal production architecture. Key points: prompt under a token budget, FIM, and acceptance rate.
- Perplexity: answer engine with more than 20 modelsReal production architecture. Key points: intent-based routing, SLA-based batching, and cost per query.
- Sycophantic GPT-4o (Apr 2025), rolled backReal incident. Key points: reward hacking via thumbs-up, launch gates, and model rollback.
- Replit (Jul 2025): agent deletes production database during code freezeReal incident. Key points: least privilege for agents, separation between dev and prod, destructive actions with approval, and backup restore.
- Uber ATG (Tempe, 2018): self-driving car hits pedestrianReal incident. Key points: classification flip-flopping between object, vehicle, and bicycle; braking disabled; safety culture; human as fallback.
- Netflix: chaos engineeringWhy take down instances on purpose in production, and how that shapes multi-region architecture.
- Uber: geospatial indexingHexagonal grids to match drivers and riders, and the cost of updating position every second.
- Facebook: BGP and DNS outageA maintenance change removed the routes from the backbone, and the recovery tools depended on the same network.
- AWS us-east-1: internal network congestionA spike in connections on the internal network affected services and the status dashboard itself.
- SPI: 24x7 real-time gross settlement, active-active, zero RPOA critical national system with public targets: RTO of 15 min, zero RPO, 99.9%, p50/p99 of 2.8 and 4.6 s, 40 s timeout that becomes a rejection. Real load: peak of 313.34 million Pix on 12/05/2025. Ideal for "design the SPI".
- Ad click aggregationClassic interview design. Key points: stream processing semantics and ledger and reconciliation.
- Object storage (S3-style)Classic interview design. Key points: storage engines (LSM) and blob and video delivery.
- Digital wallet (with a parallel to Pix)Classic interview design. Key points: ledger and reconciliation.
- Stock exchange (matching engine)Classic interview design. Key points: low-latency order matching.
- Top-K and trending in a time windowClassic interview design. Key points: probabilistic data structures and stream processing semantics.
- Google Spanner and TrueTimeReal production architecture. Key points: time and clocks.
- Facebook: scaling Memcache (NSDI 2013)Real production architecture. Key points: overload control.
- Facebook TAO: the cached social graphReal production architecture. Key points: Caching Fundamentals, Consistency Patterns, and Global-Scale Systems.
- Dropbox Magic Pocket: leaving S3 for its own exabytesReal production architecture. Key points: storage engines (LSM) and online data migration.
- Google BigtableReal production architecture. Key points: storage engines (LSM).
- Google GFS and MapReduceReal production architecture. Key points: single metadata master.
- Shopify: pods and Black Friday flash salesReal production architecture. Key points: cell-based architecture and overload control.
- Roblox Oct 2021: 73 h outage from Consul contentionReal incident. Key points: service discovery and mesh, and overload control.
- AWS us-east-1 Oct 2025: race condition in DynamoDB DNS automationReal incident. Key points: network: DNS and BGP, and overload control.
- Google Cloud Jun 2025: null pointer replicated globally via SpannerReal incident. Key points: progressive deployment and overload control.
- LLM service (ChatGPT)Classic interview design. Key points: LLM serving (inference) and rate limiting algorithms.
- LLM assistant with RAG (support and code)Classic interview design. Key points: LLM serving (inference).
- Recommendation systemClassic interview design. Key points: feature store.
- Facebook Haystack: photo storageReal production architecture. Key points: storage engines (LSM) and blob and video delivery.
- Facebook Live: live video for millionsReal production architecture. Key points: overload control and blob and video delivery.
- Google Borg: the ancestor of KubernetesReal production architecture. Key points: job scheduling.
- Google Chubby and Apache ZooKeeper: coordination and locksReal production architecture. Key points: distributed locks.
- Google Zanzibar: global authorizationReal production architecture. Key points: authentication and authorization.
- Amazon Aurora: "the log is the database"Real production architecture. Key points: storage engines (LSM).
- Hotstar: 25 million concurrent viewersReal production architecture. Key points: overload control.
- Cloudflare Nov 2023: power outage takes down the control planeReal incident. Key points: cell-based architecture.
- AWS EBS 2011: re-mirroring stormReal incident. Key points: overload control.
- Google Dec 2020: quota reported as zero takes down global loginReal incident. Key points: authentication and authorization.
- Azure Front Door Oct 2025: global config passes the safety checksReal incident. Key points: progressive deployment.
- Serving data from multiple data centersClassic interview design. Key points: networking: DNS and BGP.
- DynamoDB (2022 paper): predictable performanceReal production architecture. Key points: overload control.
- Cloudflare Jun 2022: BGP policy out of order in 19 data centersReal incident. Key points: network: DNS and BGP, and progressive deployment.
- Google Cloud Jun 2019: automation deschedules the network control planeReal incident. Key points: cell-based architecture.
- Spark and Storm: after MapReduce (Lambda and Kappa architectures)Real production architecture. Key points: stream processing semantics.
- Meta Threads: 100 million users in 5 daysReal production architecture. Key points: reuse of Instagram infrastructure and capacity estimation.
- Rogers Jul 2022: removed route filter takes down a country's networkReal incident. Key points: network: DNS and BGP, and overload control.
- QuintoAndar: conversational search with LLM re-rankingThe trade-off is explicit and measured: +4.2 s and +7% cost against +5.3% CTR and +4.8% visits, in an A/B test from Apr 7 to May 8, 2026.
- nuFormer: transaction foundation model for credit and fraudSwaps "one model per problem" for "one backbone and several heads" in a regulated sector, with transformer latency at stake.
- QuintoAndar: H3 geographic embeddings at multiple resolutionsConnects the classic "proximity service" to recommendation.
- High-resolution image synthesisClassic interview design. Key points: VQ-VAE/VQGAN, latent compression, and super-resolution.
- Text→videoClassic interview design. Key points: spatiotemporal DiT, video VAE, temporal consistency, FVD, and cost per second.
- LLM inference batching on 1 GPUClassic interview design. Key points: continuous batching, KV cache memory, and scheduling.
- TikTok/ByteDance Monolith (+ For You)Real production architecture. Key points: online training via Kafka/Flink, collision-free embedding table, and parameter synchronization.
- Meta DLRMReal production architecture. Key points: giant embedding tables and model parallelism + data parallelism.
- Pinterest PinSage / Pixie (Related Pins)Real production architecture. Key points: GCN on a bipartite graph, random walks, and MapReduce inference.
- vLLM / PagedAttention (SOSP 2023)Real production architecture. Key points: paged KV cache, memory fragmentation, continuous batching, and prefix sharing.
- Character.AI: inference optimizationReal production architecture. Key points: MQA, local/global attention, KV shared across layers, cross-turn cache, and int8.
- Imbue: 70B on 4,092 H100sReal production architecture. Key points: GPU health checks and InfiniBand failures.
- OpenAI: Kubernetes with 7,500 nodesReal production architecture. Key points: gang scheduling and scaling etcd and the API server.
- Meta: 24k-GPU clusters for Llama 3Real production architecture. Key points: RoCE vs InfiniBand and checkpointing.
- Anthropic (Aug-Sep 2025): three bugs degrade ClaudeReal incident. Key points: sticky routing, accuracy in approximate top-k, and heterogeneous hardware.
Papers
- Globally Distributed Content Delivery
- Attention Is All You Need
- Amazon Aurora: Design Considerations for High Throughput Cloud-Native Relational Databases
- Bigtable: A Distributed Storage System for Structured Data
- Network Applications of Bloom Filters: A Survey
- Large-scale cluster management at Google with Borg
- A Buffer-Based Approach to Rate Adaptation: Evidence from a Large Video Streaming Service
- Brewer's Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services
- Cassandra: A Decentralized Structured Storage System
- Reducing the Scope of Impact with Cell-Based Architecture
- Chaos Engineering
- The Chubby lock service for loosely-coupled distributed systems
- An Improved Data Stream Summary: The Count-Min Sketch and its Applications
- Conflict-free Replicated Data Types
- Dapper, a Large-Scale Distributed Systems Tracing Infrastructure
- The Dataflow Model: A Practical Approach to Balancing Correctness, Latency, and Cost in Massive-Scale, Unbounded, Out-of-Order Data Processing
- Designs, Lessons and Advice from Building Large Distributed Systems
- Dynamo: Amazon's Highly Available Key-value Store
- Event Sourcing
- f4: Facebook's Warm BLOB Storage System
- The Google File System
- Web Search for a Planet: The Google Cluster Architecture
- Gorilla: A Fast, Scalable, In-Memory Time Series Database
- Finding a Needle in Haystack: Facebook's Photo Storage
- Life beyond Distributed Transactions: an Apostate's Opinion
- Efficient and Robust Approximate Nearest Neighbor Search Using Hierarchical Navigable Small World Graphs
- HyperLogLog: the analysis of a near-optimal cardinality estimation algorithm
- Kafka: a Distributed Messaging System for Log Processing
- Time, Clocks, and the Ordering of Events in a Distributed System
- High-Resolution Image Synthesis with Latent Diffusion Models
- Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations
- Using load shedding to avoid overload
- The Log-Structured Merge-Tree (LSM-Tree)
- Maglev: A Fast and Reliable Software Network Load Balancer
- MapReduce: Simplified Data Processing on Large Clusters
- Scaling Memcache at Facebook
- Metastable Failures in Distributed Systems
- Hidden Technical Debt in Machine Learning Systems
- Google Wave Operational Transformation
- Efficient Memory Management for Large Language Model Serving with PagedAttention
- Large-scale Incremental Processing Using Distributed Transactions and Notifications
- In Search of an Understandable Consensus Algorithm
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- ReAct: Synergizing Reasoning and Acting in Language Models
- Hierarchical geospatial indexing: Google S2 Geometry and Uber's H3
- Sagas
- Serverless Computing: One Step Forward, Two Steps Back
- Workload isolation using shuffle-sharding
- Snowflake (Twitter, 2010) e Ticket Servers: Distributed Unique Primary Keys on the Cheap (Flickr, 2010)
- Spanner: Google's Globally-Distributed Database
- Canarying Releases (Site Reliability Engineering Workbook)
- Ledger: Stripe's System for Tracking and Validating Money Movement
- Online migrations at scale
- Scaling your API with rate limiters
- The Tail at Scale
- TAO: Facebook's Distributed Data Store for the Social Graph
- The WebSocket Protocol
- Deep Neural Networks for YouTube Recommendations
- Zanzibar: Google's Consistent, Global Authorization System
- ZeRO: Memory Optimizations Toward Training Trillion Parameter Models
- ZooKeeper: Wait-free Coordination for Internet-scale Systems
Concepts
- Data modeling driven by access patterns
- Buffer-based adaptive bitrate (ABR)
- Approximate nearest neighbor search with hierarchical graphs (HNSW)
- API design: idempotency, pagination, and contract evolution
- Bounded contexts and aggregates (DDD)
- Cache invalidation via leases
- Canary, blue/green, and rollback
- CAP theorem trade-offs
- CDN: DNS-based mapping and edge assembly (ESI)
- Cell-based architecture and blast radius
- Clocks, skew, and monotonic time
- Cluster scheduling (Borg-style)
- Commodity hardware and cost per query
- Consistent hashing
- Convergence without coordination with CRDTs
- Reconciliation and validation of financial data
- Distributed tracing / spans
- Double-entry ledger
- Online migration: dual write, backfill, and read switchover
- Event sourcing: state as a sequence of events
- Event time, windows, and watermarks
- FaaS limits: stateless functions and data far from the code
- Fencing tokens and leases
- Geo-replication, failover, and RPO/RTO targets
- Gossip, membership and failure detection
- Hedged and tied requests
- Hierarchical geospatial indexing (S2/H3)
- Input and output safety classifier
- Diffusion in latent space
- Leader election and consensus
- Load shedding and backpressure
- The log is the database (Aurora)
- Logical clocks and happened-before
- Look-aside caching pattern
- LSM-tree versus B-tree (log-structured storage)
- Maglev hashing and connection tracking
- MapReduce: fault-tolerant batch execution
- Merkle trees for anti-entropy
- Technical debt in ML systems: entanglement and feedback loops
- Orchestration vs. choreography
- Operational transformation vs CRDT
- Paged KV cache and continuous batching for LLMs
- Partitioned commit log
- Distributed transactions with snapshot isolation on storage with row-only atomicity (Percolator)
- Privacy and compliance by design: residency, minimization, and audit trail
- Probabilistic data structures (Bloom, HyperLogLog, Count-Min)
- Pull-based consumption model
- Quorum reads and writes (N/R/W)
- Agents: the reason-act-observe loop (ReAct)
- Relationship-based authorization (Zanzibar)
- Relaxed consistency semantics
- Replicated log / state machine replication
- Requirements and capacity estimation
- Resilience patterns: circuit breaker, bulkhead, timeout, and retry with backoff
- Retrieval-augmented generation (RAG)
- Retries, overload, and metastable failures
- Saga pattern / compensating transactions
- Sampling strategies for observability
- Search: index shards, replicas, and scatter-gather
- Self-attention and the Transformer architecture
- Shuffle sharding
- Single-master chunked storage
- Sloppy quorum and hinted handoff
- Storing many small objects (Haystack)
- Time-sortable IDs (Snowflake layout)
- Social graph cache with leader and followers (TAO)
- Steady-state hypothesis and chaos experiments
- Tail latency amplification (fan-out)
- Tentative operations and reservations
- Time-series compression (delta-of-delta and XOR)
- Token bucket and rate limiters
- Trace context propagation
- TrueTime and external consistency
- Two-stage recommendation: candidate generation and ranking
- Vector clocks for causal versioning
- Warm storage and erasure coding
- Persistent bidirectional connections (WebSocket)
- Wide-column model: tablets, SSTables, and memtable
- Zero-copy I/O
- ZeRO: partitioning training state across GPUs
Practice what you read
The school turns each case into an interview you run yourself, with feedback on your decisions.