Skip to content
THE LAB

Pick a system. Break it.

Each scenario is a live model of a real design question. Turn up the load, watch what fails, and add the parts that fix it.

1Add load
2Watch it fail
3Fix it
SD-1 · MidLIVE

URL Shortener

Challenge: Serve 400K redirects a second with p99 under 50 ms and no errors.

CacheClick queueKey serviceShards
Open the lab →
SD-2 · SeniorLIVE

Chat App

Challenge: Deliver every message in order to a million connected phones.

WebSocketsFan-outDelivery receipts
Open the lab →
SD-3 · MidLIVE

Pastebin

Challenge: Serve 200K paste reads a second with p99 under 100 ms and no errors.

Object storageCDNShardsExpiry sweeper
Open the lab →
SD-4 · MidLIVE

Photo Social Network

Challenge: Serve 200K feed loads a second with feeds under 150 ms, images under 400 ms and no errors.

Feed cacheFan-out queueImage sizesCDNShards
Open the lab →
SD-5 · SeniorLIVE

File Sync and Storage

Challenge: Keep 300M online devices in sync, with changes visible within 5 seconds, no lost edits and no errors.

Version checkPush noticesBlock syncShards
Open the lab →
SD-6 · MidLIVE

Microblog Timeline

Challenge: Serve 300K home timeline reads a second with p99 under 200 ms, posts under 500 ms and no errors.

Timeline cacheTweet streamTweet cacheHybrid fan-outShards
Open the lab →
SD-7 · SeniorLIVE

Video Streaming

Challenge: Stream to 10M viewers at once with under 1% rebuffering and first frame in under 2 s.

Segments + ABRCDNOrigin shieldTranscode queueMetadata cache
Open the lab →
SD-8 · SeniorLIVE

Typeahead Autocomplete

Challenge: Answer 600K keystrokes a second with p99 under 100 ms, no errors, and trends that show within minutes.

Trie in memoryDebounceOffline buildEdge cacheTrending layer
Open the lab →
SD-9 · SeniorLIVE

API Rate Limiter

Challenge: Hold 1M requests a second, half of them a flood, to each key’s limit: under 1% over-limit let through, under 1 ms added, no errors.

Token bucketRules cacheShared countersFail openBatched sync
Open the lab →
SD-10 · StaffLIVE

Distributed Metrics Aggregation

Challenge: Ingest 20M points a second with no dropped points and dashboard p99 under 1 second.

Sharded storeIngest logRollupsResults cacheCardinality limits
Open the lab →
SD-11 · StaffLIVE

Distributed Event Log

Challenge: Take in 3 GB/s of events, keep 7 days of them, and let consumers keep up, with produce p99 under 50 ms and no lost writes.

PartitionsReplicationBatchingConsumer groupsTiered storage
Open the lab →
SD-12 · SeniorLIVE

Key-Value Store

Challenge: Serve 1M ops a second with p99 under 10 ms, 3 copies of every key and no errors.

Consistent hashingQuorumsLSM engineBloom filtersAnti-entropy
Open the lab →
SD-13 · SeniorLIVE

Top Shared Articles

Challenge: Keep exact top-K lists within 10 s through a 100K shares/s spike, with one article taking 30% of it.

Time bucketsPartition by articlePre-aggregationCheckpointsEdge cache
Open the lab →
SD-14 · SeniorLIVE

Web Crawler

Challenge: Crawl 4,000 pages a second without hammering any site, re-fetching seen URLs or storing copies.

Fetcher fleetPer-host queuesDNS cacheBloom filterParser stream
Open the lab →
SD-15 · SeniorLIVE

News Feed

Challenge: Serve 100K feed loads/s with p99 under 200 ms, posts in feeds within 10 s, and no posts lost.

Timeline cacheHybrid fan-outPost cacheCache shardsChange stream
Open the lab →
SD-16 · StaffLIVE

Nearby Places and Friends

Challenge: Serve 10 million live sharers with search p99 under 100 ms and friends’ moves on screen within 5 seconds.

Geohash indexCell cacheLocation cacheWebSocketsPub/sub ring
Open the lab →
SD-17 · SeniorLIVE

Server Metrics Collector

Challenge: Collect metrics from 50,000 servers, 2.5 million samples a second, with dashboard p99 under 1 second and no gaps.

Time-series storeIngest logShardsRollupsQuery cache
Open the lab →
SD-18 · SeniorLIVE

Calendar Service

Challenge: Run a calendar for 50 million daily users with week views under 200 ms, saves under 500 ms and reminders on time.

Instance indexView cacheChange logReminder bucketsPush sync
Open the lab →
SD-19 · SeniorLIVE

Distributed Message Queue

Challenge: Carry 1M messages a second with publish p99 under 50 ms, 3 copies of every message and nothing lost when a consumer crashes.

Group commitPartitionsReplicationAcksDead letters
Open the lab →
SD-20 · SeniorLIVE

Web Analytics Pipeline

Challenge: Take 400K events a second with no data lost, bots filtered, and dashboards answering in under 1 second.

CollectorsEvent logColumnar storeRollupsHyperLogLog
Open the lab →
SD-21 · MidLIVE

Sorting Large Data Sets

Challenge: Sort 100 TB in under 30 minutes on at most 250 workers, without restarting when a machine dies.

External sortRange splitKey samplingCompressionTask retries
Open the lab →
SD-22 · MidLIVE

Top K Rankings

Challenge: Count 200K ranking events a second and serve fair, fresh charts with p99 under 50 ms.

Event logPartitionsTop-K listsDedupe
Open the lab →
SD-23 · MidLIVE

Job Scheduler

Challenge: Start 20K job runs a second, top-of-the-minute spikes included, within 5 s of their due time and never twice.

Run queueDue-time indexJitterShardsLeases
Open the lab →
SD-24 · SeniorLIVE

Notification Service

Challenge: Deliver 300K notifications a second during a campaign, with p99 under 5 s, OTP codes never stuck behind marketing, and nothing sent twice.

Channel queuesPreference cacheBatchingSharded logPriority lanes
Open the lab →
SD-25 · StaffLIVE

Surge Pricing

Challenge: Price 400K events a second into surge multipliers under 60 s old, with quotes under 50 ms and steady, locked prices.

Event logStream processorPartitionsIn-memory tableSmoothing
Open the lab →
SD-26 · SeniorLIVE

Concurrent Stream Limits

Challenge: Enforce screen limits for 40M concurrent streams with no races, no ghost slots and start checks under 50 ms.

Lease storeTTL leasesAtomic checkHeartbeat intervalShards
Open the lab →
SD-27 · StaffLIVE

ETA and Location Sharing

Challenge: Stream 400K driver updates a second to riders’ maps within 2 s and answer ETAs under 200 ms with live traffic.

Location storeWebSocketsTrip channelsPrecomputed routingLive traffic
Open the lab →
SD-28 · SeniorLIVE

Hotel Booking

Challenge: Serve 60K hotel searches a second, with 600 bookings a second, p99 under 150 ms and no double bookings.

Search indexAvailability cacheHoldsShards
Open the lab →
SD-29 · SeniorLIVE

A/B Testing Platform

Challenge: Take in 500K experiment events a second with flag checks under 5 ms, nothing dropped and no event counted twice.

Local assignmentCollectorsEvent streamPre-aggregationDedupe
Open the lab →
SD-30 · MidLIVE

Price Alerts

Challenge: Match 50K price changes a second on sale day and send every alert within 60 seconds, once.

Alert indexMatcher workersShardsNotify queueFire once
Open the lab →
SD-31 · StaffLIVE

Dependency Injection Framework

Challenge: Serve 30K requests a second per process with p99 under 10 ms, a validated graph and startup under 2 seconds.

Compiled plansScope disposalSingletonsLock-free cacheBuild-time codegen
Open the lab →
SD-32 · StaffLIVE

Card Payment Processing

Challenge: Authorize 10K card payments a second with p99 under 1 second and zero double charges.

Idempotency keysWebhook outboxShardsAcquirer link poolHot-account split
Open the lab →
SD-33 · SeniorLIVE

Like Counts at Scale

Challenge: Take 100K likes a second, 20K of them on one post, with count reads under 20 ms p99 and no double counts.

Unique like rowsShards by userLike log + aggregatorCount cacheHot-key copies
Open the lab →
SD-34 · StaffLIVE

Database Control Plane

Challenge: Run a 50,000-node database fleet with zone-loss recovery under 30 s and a healthy control plane.

Consensus storeHealth monitorsWatch relaysPer-shard RaftCells
Open the lab →
SD-35 · SeniorLIVE

Login and Authentication

Challenge: Serve 150K page requests a second through a credential-stuffing wave with no account takeovers.

Session storeAuth gatewayargon2idEdge rate limitsMFA step-up
Open the lab →
SD-36 · MidLIVE

Weather App

Challenge: Serve a 200K req/s storm spike with p99 under 200 ms while staying under the provider’s 2,000 calls/s cap.

Grid cellsForecast cacheBulk ingestCDN
Open the lab →
SD-37 · MidLIVE

Collaborative Documents

Challenge: Keep 1.5M editors online in sync, with edits reaching others in under 200 ms and no split documents.

WebSocket gatewaysSession registryBatchingSnapshotsOp-log shards
Open the lab →
SD-38 · MidLIVE

Social Marketplace

Challenge: Serve 20K searches a second with p99 under 200 ms, no errors and no sold items in results.

Search indexChange streamResult cacheRegion shardsImage CDN
Open the lab →
SD-39 · SeniorLIVE

Cluster Health Monitoring

Challenge: Monitor 100K hosts with samples queryable in under 30 s, no dropped samples, no false alarms and one page per failure.

CollectorsIngest logTSDB shardsRollups3 vantage pointsAlert grouping
Open the lab →
SD-40 · SeniorLIVE

Ride and Courier Matching

Challenge: Match riders with 1M drivers online, with no double bookings and pickups under 5 minutes.

Geo indexDriver connectionsLocation streamDriver locksBatched matching
Open the lab →
SD-41 · StaffLIVE

Distributed Tracing

Challenge: Take in 50M spans a second, keep every error trace, and drop nothing.

Host agentsTail samplingSpan streamObject storage blocksSpan metrics
Open the lab →
SD-42 · SeniorLIVE

Flash Giveaway

Challenge: Survive 1M claim attempts a second at launch, never give out more than 6M burgers, and one per person.

CDNWaiting roomStock shardsClaim logBot checks
Open the lab →
SD-43 · SeniorLIVE

File Downloader

Challenge: Carry 1M active downloads (25 Tbit/s) with no errors, no restarts from zero and no corrupt files.

Signed URLsCDNResumeBackoffChecksums
Open the lab →
SD-44 · MidLIVE

Live Stock Prices

Challenge: Push live prices to 10M viewers worldwide with p99 price age under 500 ms and no errors.

WebSocket pushConflationLast-price cachePartitionsRegions
Open the lab →
SD-45 · SeniorLIVE

Photo Library

Challenge: Take 20K photo uploads a second on a holiday peak, with 400K thumbnail views, timeline p99 under 150 ms and no errors.

Direct uploadsImage workersCDNShardsDedupe
Open the lab →
SD-46 · SeniorLIVE

On-Call Escalation

Challenge: Page the right engineer within 30 s through a 200K events/s alert storm, with every escalation on time.

DedupeEvent logDurable timersShardsProvider failover
Open the lab →
SD-47 · SeniorLIVE

Wire Transfer API

Challenge: Take 5K wire transfers a second with p99 under 300 ms, no duplicate sends and every cent reconciled.

Idempotency keysOutboxLedger shardsClearing bucketsReconciliation
Open the lab →
SD-48 · SeniorLIVE

Live Comments

Challenge: Keep 20M viewers' comments on screen within 2 s, with one post holding 6M of them, and no dropped connections.

GatewaysSamplingBatchingPub/sub by postShards
Open the lab →
SD-49 · MidLIVE

Live Page Viewer Count

Challenge: Show a live viewer count to 10M connected viewers, updated within 5 seconds, with no drift and no errors.

Heartbeat expiryWebSocket gatewaysGateway countingShardsGateway fan-out
Open the lab →
SD-50 · MidLIVE

Live Likes

Challenge: Take 100K likes a second, 30K of them on one post, and show 5M watchers the count within 2 seconds with no errors.

Live gatewaysCoalesced updatesLike streamCount cacheLikes keyed by user
Open the lab →
SD-51 · StaffLIVE

Cloud Data Migration

Challenge: Move 5 PB to the cloud in 30 days, every object verified, with under 1 hour of cutover downtime and production never overloaded.

Parallel agentsDedicated linkRead throttleTransfer appliancesChange capture
Open the lab →
SD-52 · SeniorLIVE

Peer-to-Peer File Transfer

Challenge: Keep 10 million peers swapping files, with a 2 GB download under 10 minutes and the tracker under 80% load.

Hashed piecesRarest firstTit-for-tatHole punchingTracker shards
Open the lab →
SD-53 · MidLIVE

Parts Compatibility

Challenge: Serve 30K shopper requests a second at a holiday peak with p99 under 200 ms and no wrong fit answers.

Search indexCompiled fitmentFit cacheCDNFeed validation
Open the lab →
SD-54 · StaffLIVE

Ads Management and Delivery

Challenge: Pick ads for 300K feed requests a second with an ad decision p99 under 80 ms, no lost events and no double billing.

Targeting indexTwo-stage rankingBudget leasesEvent streamDedupe
Open the lab →