ScaleCrafts

Hard system design problems

22 hard problems. Draw the architecture, explain your choices, and see how an interviewer would score it.

22 problems
StatusProblemTopicsDifficultyBestLists
Design a real-time chat app

Build one-to-one and group messaging with delivery receipts and online status, like WhatsApp.

WebSocketsOrderingPresenceHard
Design YouTube

Upload videos, process them into many formats and stream them to a global audience, like YouTube.

VideoTranscodingCDNHard
Design Uber

Match riders with nearby drivers in real time, track trips live and handle payments, like Uber or Lyft.

GeospatialReal-timeMatchingHard
Design Google Docs

Let many people edit the same document at once and see each other’s changes and cursors live, like Google Docs.

CollaborationOT / CRDTReal-timeHard
Design a distributed key-value store

Build a highly available key-value database that spreads data across many machines, like DynamoDB or Cassandra.

ReplicationPartitioningConsistencyHard
Design a payment system

Accept card payments for online merchants, move money correctly and never charge anyone twice, like Stripe.

PaymentsIdempotencyLedgerHard
Design Google Maps

Show map tiles, search places and compute driving routes with live traffic, like Google Maps.

GraphsMap tilesGeospatialHard
Design Zoom

Host video meetings with many participants, screen sharing and chat, like Zoom or Google Meet.

WebRTCMedia serversLow latencyHard
Design a web search engine

Crawl the web, build an index and return the most relevant pages for any query in a fraction of a second, like Google Search.

Inverted indexRankingCrawlingHard
Design an ad click aggregator

Count billions of ad clicks in near real time so advertisers see results and are billed accurately.

StreamingAggregationExactly-onceHard
Design a distributed message queue

Build a durable, high-throughput message broker that many producers and consumers share, like Kafka.

LogsReplicationPartitioningHard
Design a stock exchange

Accept buy and sell orders, match them fairly in microseconds and publish trades to the market, like NASDAQ.

Low latencyMatching engineOrderingHard
Design DoorDash

Let customers order from local restaurants and send couriers to deliver it, with live tracking, like DoorDash.

DispatchGeospatialReal-timeHard
Design a metrics monitoring system

Collect metrics from millions of servers, store them as time series, draw dashboards and fire alerts, like Datadog or Prometheus.

Time seriesIngestionAlertingHard
Design Gmail

Send, receive, store and search email for hundreds of millions of users, with spam filtering, like Gmail.

StorageSearchSpamHard
Design a real-time multiplayer game backend

Match players into game sessions and keep everyone’s game state in sync with very low latency, like Fortnite.

Real-timeNetcodeMatchmakingHard
Design trending topics (top K)

Find the top trending hashtags or videos over the last minute, hour and day from a firehose of events, like Twitter Trends.

StreamingApproximationTop KHard
Design a recommendation system

Recommend products or videos each user is likely to want, from a catalog of millions, like Amazon’s “customers also bought” or Netflix’s home page.

Machine learningBatch + streamingRankingHard
Design a content delivery network

Serve websites, images and video from servers close to users all over the world, like Cloudflare or Akamai.

Edge cachingDNSNetworkingHard
Design an object storage service

Store and retrieve any amount of data as objects in buckets with extreme durability, like Amazon S3.

DurabilityErasure codingMetadataHard
Design Twitch

Let creators stream live video to millions of viewers with low delay and live chat, like Twitch.

Live videoTranscodingChatHard
Scenario: a flash sale brings 10,000 requests a second

An online store’s traffic is usually a fiftieth of what it’s about to get. At noon a flash sale opens on 5,000 discounted phones and traffic jumps to 10,000 requests a second for 30 minutes. Every shopper must get an answer, not one phone may be oversold, and the rest of the store must keep working.

ScenarioTraffic spikesInventoryHard