🎉 Launch Sale: Get 30% off annual plans with code LAUNCH30

🎉 Launch Sale: Get 30% off annual plans

LAUNCH30

Use code at checkout for exclusive savings on yearly membership

Knowledge Hub

Interview-level system design guides

Real content with database schemas, API designs, capacity calculations, and the exact tradeoffs interviewers expect you to discuss.

Catalog snapshot

Articles

63

Topics

27

Reading

2300m

Topic:
Level:
Showing 63 of 63 articles
BeginnerWeb Services
56 min read

Design a URL Shortener

A URL shortener looks trivial. Accept a long URL, return a short one, redirect anyone who clicks it. You could build a working prototype in an afternoon with a hash map and a web server.

Horizontal scalingShardingReplicationConsistency
Asked at:GoogleMetaAmazonMicrosoft+2
BeginnerOpen article
IntermediateSocial Media
34 min read

Design a Twitter/X Home Timeline

A user with 50 followers posts a tweet. Your system writes 50 timeline entries — one into each follower's precomputed feed. Simple, fast, and the read path is a single sorted-set lookup. Now a cele...

Horizontal scalingShardingConsistencyAvailability
Asked at:TwitterMetaLinkedInPinterest
IntermediateOpen article
IntermediateReal-Time Messaging
45 min read

Design a WhatsApp-Style Chat System

Sending a message feels instant. You type "hello," tap send, and it appears on your friend's screen. Behind that simplicity is one of the hardest real-time systems to build correctly.

Horizontal scalingShardingReplicationConsistency
Asked at:MetaGoogleMicrosoftSlack
IntermediateOpen article
IntermediateInfrastructure
36 min read

Design a Rate Limiter

Every system has a breaking point. A database that handles 10,000 queries per second collapses at 50,000. An API server that serves 200 ms responses at normal load starts timing out at 3× traffic. ...

ShardingConsistencyAvailabilityPub/sub
Asked at:GoogleAmazonStripeCloudflare+1
IntermediateOpen article
AdvancedLocation Services
36 min read

Design a Ride-Hailing System

A rider opens the app, taps "Request Ride," and expects a driver to appear on their screen almost instantly. Behind that expectation is a system that must ingest 500,000 GPS updates per second from...

ReplicationAvailabilityRedisWebSocket
Asked at:UberLyftGrabOla+1
AdvancedOpen article
IntermediateNotifications
39 min read

Design a Notification System

You receive dozens of notifications every day — a shipping update, a login verification code, a friend's message, a price drop alert. Each one feels trivial. But behind that "Your order has shipped...

PartitioningMessage queueRate limitingCircuit breaker
Asked at:MetaGoogleAmazonUber+1
IntermediateOpen article
AdvancedAdvertising
33 min read

Design an Ad Click and Impression Tracking System

Every time you see an ad on a website, an impression event fires. Every time you click one, a click event fires. These events look trivial — tiny JSON payloads, maybe 320 bytes each. But multiply t...

ReplicationAvailabilityCDNRedis
Asked at:GoogleMetaAmazonTwitter
AdvancedOpen article
IntermediateSocial MediaPRO
50 min read

Designing a Facebook News Feed Platform

Beyoncé drops an album announcement post at 9:00 AM Eastern. Within 300 milliseconds, Facebook's feed infrastructure must decide which of her 95 million followers see it in their home feed, in what...

Horizontal scalingPartitioningReplicationConsistency
Asked at:MetaLinkedInTwitterTikTok
IntermediateUnlock article
AdvancedVideoPRO
23 min read

Design a Video Streaming Platform

A user clicks play on a video. In the next 2 seconds, your system must: - Authenticate and authorize the request - Determine which video quality the user's network can handle - Fetch the initial vi...

AvailabilityCachingCDNSSE
Asked at:NetflixYouTubeAmazon PrimeDisney+
AdvancedVideoPRO
49 min read

Design a TikTok-like Short Video Platform

A 16-year-old in Jakarta uploads a dance video at 11:47 PM local time. She has 47 followers. Within 6 hours, that video has 12 million views, 800,000 likes, and has spawned 3,400 duets. The recomme...

ConsistencyAvailabilityCAP theoremCaching
Asked at:TikTokMetaYouTubeSnapchat
AdvancedReal-Time CollaborationPRO
35 min read

Design a Google Docs-like Real-time Document Platform

It is 2:47 PM. Two engineers are editing the same design document. Alice inserts a paragraph at position 420: "We should use Redis for caching." At the exact same moment — literally the same millis...

Horizontal scalingReplicationConsistencyAvailability
Asked at:GoogleMicrosoftNotionFigma
IntermediateSearchPRO
29 min read

Design a Web Crawler

A web crawler seems straightforward. Fetch a page, extract links, add them to a queue, repeat. You could build one in an afternoon with Python and BeautifulSoup.

Load balancingCachingRate limitingCircuit breaker
Asked at:GoogleMicrosoftAmazonLinkedIn
IntermediateUnlock article
AdvancedStoragePRO
24 min read

Design a Cloud File Sync Service

It is 11:47 PM. You have been working on a critical presentation for three hours. Your laptop is offline — airplane mode on a flight. Meanwhile, your colleague opens the same file on their desktop ...

ShardingPartitioningAvailabilityCDN
Asked at:DropboxGoogleMicrosoftBox
IntermediateSearchPRO
31 min read

Design Search Autocomplete

Autocomplete looks trivial. User types a few characters, system returns suggestions. You could build it with a database query and a `LIKE 'prefix%'` clause in an afternoon.

ConsistencyCachingRate limitingSQL
Asked at:GoogleAmazonLinkedInSpotify
IntermediateUnlock article
IntermediateCachingPRO
36 min read

Design a Distributed Cache

A cache looks simple. Store frequently accessed data in memory. Return it fast. Evict when full. You could build a working prototype with a hash map and a TTL thread in an afternoon.

ShardingReplicationConsistencyAvailability
Asked at:AmazonGoogleMetaNetflix
IntermediateUnlock article
IntermediateE-CommercePRO
58 min read

Design a Ticket Booking System

Booking a ticket looks trivial. User selects a seat, pays, gets a confirmation. You could prototype it in a weekend with a form, a database, and a payment API.

ReplicationConsistencyAvailabilityCaching
Asked at:BookMyShowTicketmasterFandangoAmazon
IntermediateUnlock article
AdvancedInfrastructurePRO
31 min read

Design a Distributed Job Scheduler

A job scheduler looks like a simple queue with a clock. Jobs go in, the scheduler waits until the right time, jobs come out. You could build a working prototype with cron and a Redis list in an aft...

Horizontal scalingCircuit breakerSQLRedis
Asked at:GoogleAirbnbLinkedInUber
IntermediateInfrastructurePRO
31 min read

Design an API Gateway

An API gateway looks like a simple reverse proxy. Route requests to backends. Add some authentication. Maybe rate limit. You could configure nginx in an afternoon.

ConsistencyAPI gatewayRate limitingCircuit breaker
Asked at:AmazonNetflixGoogleKong
IntermediateUnlock article
AdvancedPaymentsPRO
31 min read

Design a Payment System

A payment system looks like a simple CRUD application. Create a payment, charge a card, record the result. You could build a working prototype with Stripe's API in a few hours.

PartitioningReplicationConsistencySQL
Asked at:StripePayPalSquareAmazon+1
IntermediateVideoPRO
25 min read

Design YouTube Top-K Trending Videos

It is 7:42 PM. A music video from a relatively unknown artist just dropped. In the first 90 minutes, it accumulates 1.8 million views, 340,000 likes, and 89,000 shares. The comment section is explo...

ReplicationAvailabilityMicroservicesRedis
Asked at:YouTubeTikTokTwitterReddit
IntermediateUnlock article
AdvancedAudioPRO
44 min read

Design a Spotify-like Music Streaming Platform

Taylor Swift drops a surprise album at midnight Eastern time. Within 60 seconds, 4.7 million users hit play simultaneously across 78 countries. The CDN must serve 2.3 petabytes in the first hour wh...

AvailabilityLoad balancingCachingCDN
Asked at:SpotifyApple MusicAmazon MusicYouTube Music
IntermediateSocial MediaPRO
42 min read

Design an Instagram Live Comment System

Beyoncé goes live to announce her world tour. Within 8 seconds, 2.3 million viewers are connected. Comments start flooding in at 47,000 per second — hearts, questions, excited reactions in every la...

ShardingPartitioningReplicationConsistency
Asked at:MetaTikTokYouTubeTwitch
IntermediateUnlock article
AdvancedReal-Time MessagingPRO
49 min read

Design a Slack/Discord-like Workspace Messaging Platform

The CEO opens Slack at 8:47 AM and types in #announcements: "@channel We're acquiring TechCorp. More details at the all-hands in 30 minutes." She presses Enter. Within 2 seconds, 47,000 employees a...

PartitioningConsistencyAvailabilityLoad balancing
Asked at:SlackDiscordMicrosoft TeamsMeta
AdvancedReal-Time CollaborationPRO
24 min read

Design a Real-Time Collaborative Editor

Alice is in New York. Bob is in London. Carol is in Tokyo. They are all editing the same document, the same paragraph, at the same instant. Alice inserts "quick " before "brown". Bob deletes "fox"....

ShardingReplicationConsistencyAvailability
Asked at:GoogleFigmaNotionMiro
AdvancedGamingPRO
30 min read

Design an Online Chess Platform

It is 3:47 PM. Magnus, rated 2842, moves his knight to f5 in a blitz game against Hikaru, rated 2798. His clock shows 47.3 seconds remaining. Hikaru has 52.1 seconds. The move must reach Hikaru's s...

ShardingReplicationAvailabilityCaching
Asked at:Chess.comLichessGoogle
AdvancedLocation ServicesPRO
31 min read

Design a Google Maps-like Platform

It is 5:47 PM on a Friday. Traffic is building across the city. In the next 60 seconds, your platform will process: 4 million tile requests from people panning their screens, 180,000 route computat...

ShardingAvailabilityCachingCDN
Asked at:GoogleAppleUberMapbox
IntermediateE-CommercePRO
46 min read

Design an FB Marketplace-Like Platform

It is 7:42 PM on a Saturday evening. Sarah opens her marketplace app in Brooklyn, searching for a couch within 5 miles. At this exact moment, 63,000 other users across the platform are doing the sa...

ReplicationConsistencyAvailabilityCaching
Asked at:MetaCraigslistOfferUpeBay
IntermediateUnlock article
AdvancedFintechPRO
58 min read

Design a Robinhood-like Trading Platform

It is 9:29 AM Eastern. Sarah opens the Robinhood app on her subway commute, watching NVDA tick up in pre-market. At 9:30:00.003, she taps "Buy 100 shares at market." Her phone shows a spinner for 4...

Horizontal scalingPartitioningReplicationConsistency
Asked at:RobinhoodCoinbaseE*TradeInteractive Brokers
AdvancedVideoPRO
46 min read

Design a Twitch-like Live Streaming Platform

Ninja announces a surprise Fortnite stream. Within 90 seconds, 627,000 concurrent viewers are connected. Each viewer expects less than 3 seconds of latency from the moment Ninja's webcam captures h...

Horizontal scalingShardingAvailabilityLoad balancing
Asked at:TwitchYouTubeMetaTikTok
AdvancedVideoPRO
43 min read

Design a Zoom/Google Meet Video Conferencing System

It is 9:00 AM Monday in New York. Across the world, 2.3 million meetings begin within the same five-minute window — the morning standup surge. In one of these meetings, a CEO in Tokyo needs to hear...

Horizontal scalingReplicationAvailabilityCDN
Asked at:ZoomGoogle MeetMicrosoft TeamsWebex
AdvancedSearchPRO
24 min read

Design a Distributed Search System

A user types "wireless headphones under $100 with good battery" into your search bar. In the next 120 milliseconds, your system must scan 2 billion documents, understand the query intent, match rel...

ShardingReplicationAvailabilityCaching
Asked at:GoogleElasticsearchAlgoliaAmazon
AdvancedStoragePRO
32 min read

Design an Object Storage Service (S3-like)

Somewhere in a storage cluster, a bit flips. Cosmic ray. Aging disk. Electrical noise. It does not matter why — what matters is that one of your customer's objects now has corrupted data. The custo...

PartitioningReplicationConsistencyAvailability
Asked at:Amazon S3Google Cloud StorageAzure Blob
IntermediateInfrastructurePRO
27 min read

Design a CDN

A user in Mumbai opens your app. The home screen needs a hero image, three product thumbnails, a CSS bundle, and two JavaScript files. If these assets load from your origin server in Virginia, each...

ReplicationAvailabilityCachingCDN
Asked at:CloudflareAkamaiFastlyAmazon CloudFront
IntermediateUnlock article
AdvancedMachine LearningPRO
30 min read

Design a Recommendation Serving System

A recommendation system looks like a simple retrieval problem. User comes in, you find things they might like, you show them. You could build a working prototype with a nearest-neighbor search and ...

AvailabilityCachingAPI gatewayRate limiting
Asked at:NetflixAmazonSpotifyYouTube
IntermediateNotificationsPRO
20 min read

Design an Email Delivery Platform

It is 9:47 AM. A user just completed a purchase and is waiting for their confirmation email. They check their inbox — nothing. They check spam — nothing. They check again five minutes later — still...

ReplicationAvailabilityMessage queueRate limiting
Asked at:SendGridMailchimpAmazon SESPostmark
IntermediateUnlock article
AdvancedAnalyticsPRO
29 min read

Design a Real-Time Analytics Platform

A real-time analytics platform looks like a straightforward data pipeline. Events flow in, get aggregated, and dashboards show charts. You could prototype one with Kafka and a SQL database in a few...

PartitioningReplicationCachingSQL
Asked at:Google AnalyticsAmplitudeMixpanelSegment
AdvancedDistributed SystemsPRO
28 min read

Design a Distributed Lock Service

A distributed lock looks like a simple problem. Store a key-value pair: `lock_X = owned_by_client_A`. Check if the key exists before writing. You could build a working prototype with Redis `SETNX` ...

PartitioningReplicationConsistencyAvailability
Asked at:GoogleAmazonMicrosoft
AdvancedDistributed SystemsPRO
20 min read

Design a Distributed Configuration Service

It is 2:37 AM. Your payment service is experiencing elevated error rates. The on-call engineer identifies the culprit: a misconfigured timeout value pushed an hour ago. They need to roll back immed...

ReplicationConsistencyAvailabilityCaching
Asked at:NetflixGoogleHashiCorp
AdvancedMonitoringPRO
18 min read

Design a Distributed Metrics Platform

It is 2:47 AM. Your on-call engineer receives a page: "Payment success rate dropped below 99%." They open the dashboard — and it shows no data. The metrics platform is down. Or worse, it is up but ...

ShardingReplicationConsistencyAvailability
Asked at:DatadogNew RelicPrometheusGrafana
IntermediateInfrastructurePRO
27 min read

Design a Feature Flag Platform

A feature flag platform looks simple. Store some boolean values, return them when asked. You could build a working prototype with a config file and an environment variable in minutes.

ConsistencyAvailabilityCachingCDN
Asked at:LaunchDarklySplit.ioOptimizelyMeta
IntermediateUnlock article
AdvancedSecurityPRO
22 min read

Design a Fraud Detection Pipeline

It is 11:47 AM on Black Friday. Your payment authorization rate just dropped from 97% to 89%. Customer support lines are exploding. Revenue is bleeding. The cause? Your fraud model, retrained yeste...

AvailabilityAPI gatewayRate limitingSQL
Asked at:StripePayPalSquareAmazon
AdvancedPaymentsPRO
24 min read

Design a Payment Reconciliation Engine

At 3:47 AM, your payment API returned "success" for a $47.99 charge. The customer saw "Payment Complete." The merchant received a confirmation webhook. Everyone went home happy.

PartitioningReplicationAvailabilitySQL
Asked at:StripePayPalSquareAdyen
AdvancedDeveloper ToolsPRO
27 min read

Design an Online Code Execution Platform

A user submits this code:

ReplicationAvailabilityCachingAPI gateway
Asked at:LeetCodeHackerRankCodeSignalReplit
AdvancedReal-Time MessagingPRO
21 min read

Design a Global Chat Platform

Alice in New York sends a message to Bob in Tokyo. Within 300 milliseconds, that message must be written durably, ordered correctly against Bob's other conversations, delivered to his phone and lap...

ShardingPartitioningReplicationConsistency
Asked at:MetaDiscordTelegramWhatsApp
AdvancedMonitoringPRO
30 min read

Design an Observability Platform

An observability platform looks like a straightforward data pipeline. Services emit logs, metrics, and traces. You store them somewhere. Dashboards query the data. Engineers debug issues.

CachingRedisKafkaSSE
Asked at:DatadogSplunkNew RelicElastic
IntermediateSocial MediaPRO
27 min read

Design a Tinder-like Dating Platform

It is 8:47 PM on a Friday night. Alex in San Francisco opens the app and starts swiping. At 8:47:32.445 PM, Alex swipes right on Jordan. At that exact same millisecond — 8:47:32.445 PM — Jordan in ...

PartitioningAvailabilityCDNMicroservices
Asked at:TinderBumbleHingeMatch
IntermediateUnlock article
IntermediateSocial MediaPRO
33 min read

Design a Strava-like Fitness Platform

It is 6:47 AM. Sarah just finished her morning run through downtown San Francisco. Her Garmin syncs to the app. The screen shows: 10.2 km, 52:18 moving time, 312 meters elevation gain. She checks t...

ReplicationConsistencySQLRedis
Asked at:StravaNikeGarminFitbit
IntermediateUnlock article
IntermediateLocation ServicesPRO
32 min read

Design a Nearby Discovery Platform

It is 7:14 PM on a Friday evening. Maya opens her app in downtown Manhattan to find nearby friends, restaurants, and events. Within 180 milliseconds, she sees: 4 friends "nearby" (one within 500m, ...

Horizontal scalingReplicationConsistencyAvailability
Asked at:YelpFoursquareGoogleFacebook
IntermediateUnlock article
IntermediateProductivityPRO
49 min read

Design a Google Calendar-like Platform

It is 2:58 PM. Sarah clicks "Find a time" hoping to schedule a 30-minute sync with 12 colleagues scattered across New York, London, Berlin, and Singapore. Within two seconds, the calendar must quer...

ReplicationConsistencyAvailabilityCaching
Asked at:GoogleMicrosoftAppleCalendly
IntermediateUnlock article
IntermediateSocial MediaPRO
52 min read

Design a Google News Feed Platform

It is 3:47 PM on a Tuesday. A major tech company announces unexpected layoffs. Within 90 seconds, 2.3 million users open Google News expecting to see the story. The wire services published 47 versi...

PartitioningConsistencyAvailabilityCaching
Asked at:GoogleApple NewsFlipboardTwitter
IntermediateUnlock article
IntermediateE-CommercePRO
40 min read

Design an Online Auction Platform

The auction timer shows 00:00:03. Marcus's finger hovers over the bid button, ready to outbid the current leader at $4,250 for a vintage watch. He clicks at 00:00:01—the screen freezes, then shows ...

ShardingPartitioningReplicationConsistency
Asked at:eBayChristie'sSotheby'sAmazon
IntermediateUnlock article
IntermediateE-CommercePRO
38 min read

Design a Price Tracker Platform

It is Black Friday morning, 3:47 AM Eastern. A PlayStation 5 drops from $499 to $379 on Amazon — a $120 discount that will last exactly 94 seconds before inventory sells out. In your database, 847,...

PartitioningReplicationConsistencyAvailability
Asked at:HoneyCamelCamelCamelKeepaRetailMeNot
IntermediateUnlock article
AdvancedGamingPRO
44 min read

Design a Real-Time Multiplayer Game State Sync System

Player1 fires a headshot at T+0ms while Player2's client still shows them behind cover. By the time that INPUT_CMD packet travels 80ms across the Atlantic, Player2 has already moved. The server mus...

ShardingPartitioningReplicationConsistency
Asked at:Riot GamesEpic GamesRobloxUnity
IntermediateReal-TimePRO
50 min read

Design a Live Sports Score and Commentary System

It is the World Cup final. Messi takes a penalty kick at T+0. In living rooms across 200 countries, 847 million viewers are watching — but 12 million of them are tracking the score on their phones ...

PartitioningConsistencyAvailabilityLoad balancing
Asked at:ESPNYahoo SportsThe ScoreFanDuel
IntermediateUnlock article
IntermediateAudioPRO
43 min read

Design a Podcast Platform (Spotify/Apple Podcasts)

Joe Rogan releases a 3-hour episode at 6:00 AM Pacific. By 6:05 AM, 2.1 million podcast apps are polling his RSS feed simultaneously. Within the hour, 800,000 downloads are in progress—each pulling...

ShardingPartitioningReplicationConsistency
Asked at:SpotifyApple PodcastsGoogle PodcastsStitcher
IntermediateUnlock article
IntermediateMedia ProcessingPRO
45 min read

Design an Image Processing Pipeline (Cloudinary-like)

A photographer uploads a 47MB RAW image from their DSLR to an e-commerce platform. Within 800 milliseconds, the system must generate a 200x200 thumbnail for the admin panel, a 1200x900 hero image f...

ReplicationConsistencyAvailabilityCaching
Asked at:CloudinaryImgixAdobeCanva
IntermediateUnlock article
IntermediateDistributed SystemsPRO
40 min read

Design a Distributed Task Queue (Celery/SQS-like)

Black Friday, 2:47 AM. Your e-commerce platform's order processing queue has 2.8 million pending tasks. A worker pod crashes mid-execution while charging a customer's credit card for a $3,200 lapto...

PartitioningReplicationAvailabilityAPI gateway
Asked at:CeleryAmazon SQSRabbitMQGoogle
IntermediateUnlock article
IntermediateSecurityPRO
58 min read

Design a Secret Management System (Vault-like)

A developer accidentally commits an AWS root account key to a public GitHub repository. Within 47 seconds, an automated bot has discovered it and begins spinning up cryptocurrency mining instances....

PartitioningReplicationConsistencyAvailability
Asked at:HashiCorpAWSGoogleAzure
IntermediateUnlock article
AdvancedInfrastructurePRO
47 min read

Design an A/B Testing / Experimentation Platform

The product team ships a redesigned checkout flow to 5% of users on a Wednesday morning. By noon, revenue in that cohort has dropped 23%. The experiment platform must detect this regression within ...

PartitioningConsistencyAvailabilityCaching
Asked at:GoogleMetaNetflixAirbnb
IntermediateMonitoringPRO
48 min read

Design a Log Aggregation System (Splunk/ELK-like)

Production is down. Forty-seven engineers are frantically searching logs trying to find the root cause of the cascading failure that started twelve minutes ago. There are 2.3 billion log lines from...

PartitioningReplicationAvailabilityCaching
Asked at:SplunkElasticDatadogSumo Logic
IntermediateUnlock article
AdvancedDatabasePRO
57 min read

Design a Database Connection Pooler (PgBouncer-like)

Your e-commerce platform launches a flash sale at midnight. Traffic spikes 15x in sixty seconds. Behind the scenes, 2,400 serverless functions spin up simultaneously, each trying to establish its o...

ShardingAvailabilityLoad balancingCaching
Asked at:PgBouncerProxySQLAmazonGoogle
IntermediateInfrastructurePRO
44 min read

Design a Canary Deployment System

A new payment service version ships to 5% of production traffic. Within three minutes, the canary system detects that p99 latency has spiked from 45ms to 2.3 seconds. Before engineers even notice t...

Horizontal scalingPartitioningConsistencyAvailability
Asked at:GoogleNetflixAmazonSpinnaker
IntermediateUnlock article
IntermediateDistributed SystemsPRO
29 min read

Design a Distributed Lock Service

A distributed lock looks like a simple problem. Store a key-value pair: `lock_X = owned_by_client_A`. Check if the key exists before writing. You could build a working prototype with Redis `SETNX` ...

PartitioningReplicationConsistencyAvailability
IntermediateUnlock article