20 system design interview questions, answered
The classic questions of the system design round at product companies, each with the clarifying questions to ask, the numbers to estimate, a reference design explained step by step, and the follow-ups interviewers ask. Then practise them in the interview simulator.
Easy
Medium
Design InstagramDesign a photo-sharing service like Instagram.feed · media · fan-outDesign Twitter / XDesign Twitter/X: users post short tweets, follow others, see a home timeline, and search recent tweets.feed · fan-out · searchDesign a notification serviceDesign a service that other teams use to send push notifications, SMS and emails to users, reliably and at high volume.queues · reliability · third partiesDesign a rate limiterDesign a server-side rate limiter for a large API platform.algorithms · Redis · distributedDesign a distributed cacheDesign a distributed in-memory cache like Memcached/Redis Cluster that many services use to store hot key-value data across a fleet of cache servers.consistent hashing · replication · evictionDesign a real-time gaming leaderboardDesign a real-time leaderboard for a mobile game.sorted sets · real-time · shardingDesign search autocompleteDesign search autocomplete: as someone types into a search box, show the 5 most popular searches that start with what they've typed so far.trie · caching · data pipelineDesign a proximity service (Yelp)Design the "nearby" search of an app like Yelp: given a user's location and a radius, return the businesses around them.geohash · geospatial · read-heavy
Hard
Design YouTubeDesign a video-sharing platform like YouTube.video · transcoding · CDNDesign WhatsAppDesign a chat app like WhatsApp: one-to-one and small group messaging, delivered in real time, with online status and message history across devices.real-time · WebSocket · presenceDesign UberDesign a ride-hailing service like Uber: riders request a ride, nearby drivers are matched, and both see each other's location in real time until the trip ends.geospatial · real-time · matchingDesign NetflixDesign a subscription video streaming service like Netflix.video · CDN · recommendationsDesign a payment systemDesign the payment backend for an e-commerce site: when a customer checks out, charge their card through a payment provider, record the money movement correctly, and pay out to sellers.consistency · idempotency · ledgerDesign Google Drive / DropboxDesign a file storage and sync service like Google Drive or Dropbox: users upload files, access them from any device, and changes sync automatically.sync · blocks · consistencyDesign a ticket booking systemDesign a ticket booking system like Ticketmaster.contention · consistency · waiting roomDesign Google DocsDesign a collaborative document editor like Google Docs.real-time · collaboration · OT / CRDTDesign a web crawlerDesign a web crawler for a search engine: start from seed URLs, download pages, extract their links and keep going, collecting a billion pages a month.BFS · politeness · dedupDesign a distributed key-value storeDesign a distributed key-value store like Amazon Dynamo or Cassandra: put(key, value) and get(key) on huge amounts of data, always available, and still working while servers fail.CAP · quorum · replicationDesign a distributed message queue (Kafka)Design a distributed message queue like Kafka: producers send messages to topics, consumer groups read them in order and can replay them, messages are kept for two weeks, and nothing is lost when a broker dies.streams · partitions · delivery