Interview prep

Interview prep · 11 min

Most-asked design questions

The system design questions that come up most, what each one tests, and where to learn it here.

This is a list of the high-level design questions that come up most often in interviews, grouped by the kind of system they describe. For each one you get the two or three ideas the question is really testing, a rough sense of how often it is asked, and links to the lessons and labs in this course that teach those ideas.

How to use this list

Don't try to memorise 50 designs. There aren't 50 different answers here. There are perhaps a dozen core ideas (fan-out, caching, partitioning, idempotency, queues, geospatial indexes, consensus, stream processing...), and every question is a different mix of them. The "What it really tests" column is the point of this page. When you can look at a new question and name its two or three hard parts within a minute, you are ready.

New to system design? Finish Part 1 of the path first, then do these five, in this order: a URL shortener (lab), a rate limiter (lab), a news feed (lab), a chat app (lab) and a flash sale (lab). Between them they cover most of the core ideas below, from caching and IDs to fan-out, real-time delivery and contention.

Then a good way to work through the rest:

  1. Start with the High rows. They are the ones most likely to come up and they cover most of the core ideas.
  2. Pick one question per category and design it end to end in 45 minutes, out loud, using the interview framework. Then open the linked lab and compare.
  3. For the rest, just do the first 10 minutes: requirements, rough numbers, and naming the hard parts. Check that your hard parts match the column.
  4. Notice the repeats. "Ticket booking", "flash sale" and "hotel booking" are the same problem in different clothes: many people want one scarce thing at the same instant.

Frequency is a rough judgement, not a statistic. High means it shows up at most companies that run design rounds. Med means common but not universal. Low means it shows up mainly at companies whose product is close to the question.

Social and feeds

Feed and social questions are favourites at consumer-internet companies, FAANG included. They all revolve around one tension: a post is written once and read by thousands, so do the work when it is written or when it is read?

Question What it really tests Frequency Learn it here
Design a news feed (Instagram, Facebook) Fan-out on write vs on read, celebrity accounts, feed caching High Instagram lab, News feed lab, Hot spots
Design the Twitter home timeline Timeline precomputation, hybrid fan-out, cache sizing High Twitter lab, Queues and pub/sub
Design Reddit or Hacker News ranking Vote counting at scale, time-decayed scores, recomputing rankings Med Reddit lab, Counting across machines
Design a social graph with friend suggestions Graph storage, "friends of friends" queries, offline batch jobs Med Graph stores, Batch processing
Design ratings and reviews (for restaurants or products) Data model, precomputed averages, abuse and moderation queues Low A repeatable approach (worked through as the example), Cache-aside
Design a real-time leaderboard Sorted sets, ranking at scale, sharding a single ranking Med Leaderboard lab, Redis

Messaging and real-time

Anything with "live", "chat" or "presence" is about long-lived connections and getting a message to the one server that holds the right connection. Messaging-heavy products (WhatsApp, Slack, Discord) and Indian apps with live order tracking or live cricket ask these a lot.

Question What it really tests Frequency Learn it here
Design a chat app (WhatsApp, Messenger) WebSockets, routing between servers, ordering and delivery receipts, offline delivery High WhatsApp lab, Live updates across many servers
Design a notification system (push, SMS, email) Queues per channel, retries, deduplication, user preferences High Notifications lab, Jobs that can run twice
Design online presence ("last seen", green dot) Heartbeats, failure detection, fan-out of status changes Med Discord lab, Failure detection
Design live comments or live scores at IPL scale Massive read fan-out, server-sent events, sampling and dropping Med Cricbuzz lab, Server-sent events
Design an email service (Gmail) Durable storage per mailbox, search, spam pipeline, SMTP in and out Low Gmail lab, A separate search index
Design a collaborative editor (Google Docs) Concurrent edits, operational transforms or CRDTs, presence cursors Med Google Docs lab, CRDTs
Design a webhooks platform At-least-once delivery, retries with backoff, signing, per-customer isolation Med Webhooks, Retries and dead letters
Design video conferencing (Zoom, Meet) UDP vs TCP, media servers that forward rather than mix, regional routing Low TCP, UDP and QUIC, Routing users globally

Media, storage and files

These are about big blobs: where they live, how they reach users quickly, and how you avoid sending the same bytes twice.

Question What it really tests Frequency Learn it here
Design YouTube or Netflix Upload and transcode pipeline, adaptive bitrate, CDNs High YouTube lab, CDNs
Design Dropbox or Google Drive Chunking and deduplication, sync and conflict handling, metadata vs blob storage High Dropbox lab, Object storage
Design Spotify Fast start of playback, caching popular tracks, catalogue search Med Spotify lab, Where caches live
Design live video streaming (Hotstar during a final) Segmenting a live stream, CDN fan-out, sudden traffic spikes Med CDNs, Load shedding
Design an object store or distributed file system (S3, HDFS) Metadata service, replication vs erasure coding, durability maths Med S3 lab, Why replicate?
Design Pastebin Key generation, blob storage, expiry Low Bitly lab, Object storage

Commerce and payments

Money and inventory questions are where correctness beats speed. They are a staple at e-commerce and fintech companies; in India expect them at Flipkart, Razorpay, PhonePe, CRED and friends. Listen for "never twice": never charge twice, never sell the same seat twice.

Question What it really tests Frequency Learn it here
Design a payment system or wallet Idempotency keys, ledgers and double entry, reconciliation with banks High Razorpay lab, Idempotency keys
Design ticket booking (BookMyShow) Seat holds with expiry, locking, payment timeouts High BookMyShow lab, Pessimistic and optimistic locking
Design an e-commerce platform (Flipkart, Amazon) Service boundaries, catalogue search, checkout across services High Drawing boundaries, Checkout lab
Design a flash sale with limited inventory Contention on one counter, queuing buyers, no overselling High Flash sale lab, Counting across machines
Design hotel or flight booking Availability search vs booking, isolation, holds and overbooking policy Med Isolation levels, Sagas
Design a coupon and offers engine Rule evaluation, per-user usage limits, races on "first 1,000 users" Med Counting across machines, Redis
Design a stock exchange Order matching, strict ordering, low latency, durable sequenced log Low Stock exchange lab, Write-ahead logs

Location and delivery

Anything with a map is a geospatial indexing question plus a stream of location updates. Food delivery and quick commerce questions are especially common at Swiggy, Zomato, Zepto and Uber.

Question What it really tests Frequency Learn it here
Design a ride-hailing app (Uber, Ola) Location updates at high write rate, nearby search, matching High Uber lab, Geohashes and quadtrees
Design a food delivery app (Swiggy, Zomato) Order state machine, rider dispatch, live tracking High Swiggy lab, Live order tracking lab
Design "find nearby places" (Yelp, Google Places) Geospatial index, read-heavy caching, combining with text search High Proximity lab, Geohashes and quadtrees
Design Google Maps routing and ETAs Graph partitioning, precomputed shortcuts, live traffic Med Google Maps lab
Design quick commerce (10-minute delivery) Per-store inventory, nearest dark store, reservation during checkout Med Swiggy lab, Counting across machines
Design surge pricing Supply and demand per area in sliding windows, stream processing Low Stream processing, Time and windows

Infrastructure building blocks

These questions ask you to build one of the boxes you normally just draw. They test whether you know what is inside. Infrastructure-heavy companies and senior rounds lean on them.

Question What it really tests Frequency Learn it here
Design a URL shortener (Bitly) Short ID generation, read-heavy caching, redirects High Bitly lab, Unique IDs at scale
Design a rate limiter Token bucket vs windows, shared counters, failing open or closed High Rate limiter lab, Token bucket
Design a distributed cache (Redis, Memcached) Consistent hashing, eviction, replication and hot keys High The consistent hash ring, Redis
Design a key-value store (Dynamo) Partitioning, quorum reads and writes, conflict resolution High DynamoDB lab, Leaderless replication
Design a distributed message queue (Kafka) Partitioned log, replication, consumer offsets Med Kafka lab, How Kafka works
Design a distributed job scheduler Durable schedule, claiming jobs exactly once, missed runs Med Job scheduler lab, Scheduled jobs
Design a unique ID generator Snowflake layout, clock skew, ordering vs coordination Med Unique IDs at scale, Clocks lie
Design a distributed lock service Leases, consensus, fencing tokens Med Distributed locks, ZooKeeper and etcd
Design an API gateway or load balancer L4 vs L7, health checks, auth and limits at the edge Med Load balancers, API gateways
Design a service that runs in many regions Active-active vs active-passive, data residency, failover Med Running in many regions, Disaster recovery
Design ChatGPT (serving an LLM to millions of users) GPU batching, the KV cache, streaming tokens, admission control, cost per token Med LLM serving lab, LLMs for system designers

Search and discovery

Question What it really tests Frequency Learn it here
Design typeahead or search autocomplete Tries with precomputed top-k, caching per prefix, offline rebuilds High Typeahead lab, Tries and FSTs
Design a web crawler URL frontier, politeness per domain, deduplication High Web crawler lab, Bloom filters
Design a search engine (or product search) Inverted index, sharding the index, ranking, keeping it in sync Med Search engine lab, Elasticsearch

Data and analytics

Counting things at scale: clicks, views, metrics. The hard parts are almost always duplicates, late data and approximate answers that are good enough.

Question What it really tests Frequency Learn it here
Design top-K trending (hashtags, songs, searches) Streaming counts, count-min sketch, time windows High Top-K heavy hitters, Count-min sketch
Design an ad click aggregator Exactly-once counting for billing, stream vs batch, deduplication Med Ad clicks lab, Delivery guarantees
Design metrics and monitoring (Datadog, Prometheus) Time-series storage, high write rate, downsampling, alerting Med Metrics lab, Metrics, logs and alerts
Design a real-time analytics dashboard Stream processing, windowed aggregates, pushing updates Med Live dashboard lab, Time and windows
Design a view or like counter (YouTube views) Sharded counters, batching writes, unique counts with HyperLogLog Med Counting across machines, HyperLogLog

Name the hard parts

Pick a question that is not on this list: "Design a system that sends a reminder to every user whose subscription expires tomorrow." Before designing anything, name the two or three ideas it really tests, and find the rows above that test the same things.

Show one answer

It tests scheduled work at scale (finding millions of due items every day without scanning the whole table), not sending twice (a reminder job that crashes halfway and restarts must skip users already reminded) and multi-channel delivery (push, SMS, email, with retries).

The closest rows are the distributed job scheduler and the notification system. So the design is roughly: a scheduler that finds due subscriptions (with an index on expiry date), puts one idempotent job per user on a queue, and hands off to the notification pipeline.