System Design Problems

86+ real interview problems. Filter by difficulty, topic, or company — then design, get AI feedback, and track your progress.

ProMedium
Design YouTube

Design a video platform like YouTube, used by 2B monthly viewers and millions of creators. Creators upload 500 hours of video every minute; viewers generate 5B watch sessions/day, a roughly 1000:1 read-to-write ratio. Videos must start playing in under 2 seconds worldwide, uploads must be transcoded into a dozen formats within minutes, and a video that goes viral can jump from 10 views/hour to 1M views/hour with no warning.

StreamingCDNMachine LearningVideo
NetflixYouTube
Core Services
Unlock
ProMedium
Design Twitter

Design a microblogging service like Twitter serving 250M daily users. The system ingests 6,000 tweets/sec on average (500M/day) and serves 300k home-timeline reads/sec, a heavily read-skewed workload. The core tension: a celebrity with 100M followers tweets once and that single write logically touches 100M timelines, so a naive fan-out melts and a naive pull is too slow. Timelines must feel fresh within seconds.

Fan-out on WriteSocial FeedReal-timeCaching
TwitterMeta
Core Services
Unlock
ProMedium
Design Instagram

Design a photo and short-video sharing app like Instagram with 2B monthly users. Users upload 100M photos and reels per day (avg 2MB each, ~200TB/day of new media) and generate 4B feed impressions daily. Stories must vanish exactly 24 hours after posting across every cache and client, and the reels tab must rank short videos from non-followed creators fast enough to keep p99 feed load under 300ms.

Object StorageCDNSocial FeedMachine Learning
MetaSnapchat
Core Services
Unlock
ProHard
Design Uber

Design a ride-hailing platform like Uber operating in 700 cities with 25M trips/day. At peak, 5M drivers stream GPS updates every 4 seconds (about 1.25M location writes/sec) while riders request matches that must complete in under 30 seconds. Supply and demand shift block by block in real time, pricing must respond to local imbalance, and a payment or matching failure directly strands a person on the street.

GeospatialReal-timeMatchingPayments
UberLyft
Core Services
Unlock
ProHard
Design Netflix

Design a subscription video streaming service like Netflix with 260M subscribers in 190 countries. Peak evening traffic reaches 100M concurrent streams and accounts for a double-digit share of downstream internet bandwidth in some regions. The catalog is small (about 20k titles) but each title needs hundreds of encode variants, personalization drives 80% of viewing, and a new season release drops a predictable 10x regional traffic spike at midnight.

StreamingCDNMachine LearningVideo
NetflixAmazon
Core Services
Unlock
ProHard
Design Facebook News Feed

Design the ranked news feed for a social network with 2B daily users. Users and pages create 200k posts/sec at peak, and the feed serves 5M feed-load requests/sec, each requiring candidate retrieval from thousands of friends and pages, scoring, and ad slotting. The twist is scale asymmetry: most users have 300 friends, but pages have up to 100M followers, and every feed load must blend fresh organic posts with ads under a strict latency budget.

Fan-out on WriteSocial FeedCachingMachine Learning
MetaLinkedIn
Advanced
Unlock
ProHard
Design Google Search

Design a web search engine at Google scale: 8.5B queries/day (100k QPS average, 200k peak) over an index built from 400B+ crawled pages. Crawling must revisit news sites within minutes but personal blogs monthly, the inverted index spans tens of petabytes across thousands of shards, and every query must return ranked results in under 300ms even though it fans out to hundreds of index servers, any of which can be slow or dead.

Inverted IndexWeb CrawlingSearch & RankingTypeahead
GoogleBing
Advanced
Unlock
ProMedium
Design a Leaderboard

Design a real-time leaderboard for a mobile game with 50M daily players. Matches finish at a rate of 100k score submissions/sec at peak, and every player expects to see the global top 100 plus their own exact rank among tens of millions instantly after each match. Naive rank queries are O(n) per lookup at 50M rows; the interesting problem is keeping ranks queryable in milliseconds while scores mutate 100k times a second, including weekly resets.

Real-timeCachingAnalytics
GamingSports
Edge Cases
Unlock
ProMedium
Design a Rate Limiter

Design a rate limiter guarding a public API platform that serves 1M requests/sec across a fleet of hundreds of gateway nodes. Each of 50M API keys has its own quota (e.g., 100 req/sec with short bursts allowed), so limits must be enforced across nodes that each see only a slice of traffic. The twist is the accuracy/latency trade-off: a perfectly accurate global counter adds cross-node coordination to every request, but the limit decision budget is about 1ms.

Rate LimitingKey-Value StoreCaching
API Providers
Edge Cases
Unlock
ProHard
Design a Recommendation Engine

Design a recommendation engine for a commerce and media platform with 100M monthly users and a catalog of 10M items. It must answer 50k recommendation requests/sec with a ranked slate per user, learning from 1B interaction events/day. The hard parts: new items and brand-new users have no history (cold start), user intent shifts within a session (browsing gifts vs. shopping for self), and a click must influence the very next page's recommendations.

Machine LearningData PipelineAnalytics
NetflixAmazon
ML-Infused
Unlock
ProHard
Design Fraud Detection System

Design a fraud detection system for a payment processor handling 10k transactions/sec (about 850M/day), where roughly 0.1% are fraudulent. The verdict must be returned inline in the payment authorization path within a 200ms budget, so heavyweight scoring competes directly with checkout latency. False positives block real customers and cost more revenue than most fraud; fraud patterns also shift within hours, so yesterday's model is already stale.

Machine LearningReal-timeAnalyticsPayments
PayPalStripe
ML-Infused
Unlock
ProHard
Design Personalized Search Ranking

Design personalized search ranking for an e-commerce marketplace with 200M products and 30k queries/sec at peak. The same query ('running shoes') should rank differently for a marathoner and a casual buyer, using each user's history without violating a 250ms end-to-end budget. Every ranking change must be validated by A/B experiment before full rollout, and personalization must never hide exact-match results the user explicitly searched for.

Search & RankingMachine LearningInverted Index
GoogleBing
ML-Infused
Unlock
ProMedium
Design A/B Testing Framework

Design an experimentation platform for a product with 100M users, running 500 concurrent A/B tests. Clients request variant assignments at 200k QPS and emit 1M exposure/conversion events/sec. Assignments must be deterministic and sticky per user, overlapping experiments must not bias each other, and a bad variant must be killable everywhere within a minute. Results must flag significance correctly despite teams peeking at dashboards daily.

AnalyticsExperimentationData Pipeline
GoogleMeta
Edge Cases
Unlock
ProMedium
Design a Notification System

Design a notification platform delivering push, SMS, and email for a consumer app with 500M registered devices. Steady state is 150M notifications/day, but a breaking-news or promo blast can require sending 50M notifications in under 5 minutes (about 170k sends/sec). Users have per-channel preferences and quiet hours, third-party gateways (APNs, carriers) throttle and fail independently, and a duplicate send is a user-visible bug.

NotificationsPub/SubFan-out on Write
SlackGmail
Core Services
Unlock
ProMedium
Design a File Storage System

Design a cloud file storage and sync service like Dropbox for 200M users storing 10B files (average 2MB, tens of PB total). Clients on desktop and mobile must converge to the same state after offline edits, uploads run at 500k files/min at peak, and most 'new' bytes are duplicates: the same file edited slightly or shared across users. The twist is sync correctness - two devices editing the same file offline must never silently lose either version.

Object StorageReplicationSync & ConflictMetadata
AWS S3Google Drive
Core Services
Unlock
ProHard
Design a Task Scheduler

Design a distributed job scheduler running 10M scheduled and recurring jobs/day for internal teams: cron-style triggers, multi-step DAG pipelines, and delayed one-offs. Peak load hits 50k job launches/min at the top of each hour, jobs range from 1-second scripts to 6-hour batch runs, and workers die mid-execution routinely. The core tension is exactly-once semantics: a payment-report job must not run twice, but a crashed run must still be retried.

SchedulingMessage QueueLeader Election
AirflowKubernetes
Advanced
Unlock
ProHard
Design a Video Call System

Design a video conferencing system like Zoom supporting 10M concurrent meetings at peak, from 1:1 calls to 500-participant town halls. Real-time media tolerates almost no delay: mouth-to-ear latency must stay under 200ms, yet participants join from networks losing 5%+ of packets. Every participant sending video to every other is O(n^2) upstream bandwidth, so the architecture must decide per meeting how media is routed, mixed, or forwarded.

Real-timeStreamingWebSocketsVideo
ZoomGoogle Meet
Advanced
Unlock
ProMedium
Design a Logging System

Design a centralized logging platform ingesting logs from 5,000 services across 100k hosts: 2M log lines/sec sustained (about 20TB/day), spiking to 10M lines/sec during incidents - precisely when engineers need search most. Logs must be searchable within seconds for on-call debugging, retained 30 days hot and 1 year cold, and the pipeline must apply backpressure without ever crashing the applications emitting the logs.

ObservabilityAnalyticsSearch & Ranking
ELK StackSplunk
Basics
Unlock
ProMedium
Design a Metrics Monitoring System

Design a metrics and monitoring platform for an infrastructure of 100k hosts and 5,000 services. Agents emit 10M data points/sec across 500M active time series, dashboards are refreshed by thousands of engineers, and alert rules are evaluated continuously. The paradox to design around: the monitoring system must stay up and fast precisely when the infrastructure it watches is on fire and cardinality explodes from a bad deploy tag.

ObservabilityAnalyticsTime Series
PrometheusGrafana
Basics
Unlock
ProMedium
Design a Key-Value Store

Design a distributed key-value store in the spirit of DynamoDB: 1M operations/sec (80% reads) over 100TB of data with values up to 400KB. Nodes fail weekly at fleet scale, and the store must keep serving through node loss, network partitions, and rolling upgrades. The central design axis is the consistency dial: some tables need read-your-writes, others prefer availability and can tolerate stale reads - the API must let callers choose.

Key-Value StoreShardingReplicationConsistency
RedisDynamoDB
Advanced
Unlock
ProMedium
Design a Message Queue

Design a distributed message queue in the spirit of Kafka, carrying 1M messages/sec (average 1KB) between hundreds of producer and consumer services. Consumers range from real-time fraud checks that need messages in milliseconds to batch jobs that fall hours behind and then catch up, so the queue must buffer days of backlog (tens of TB) without slowing producers. Broker crashes must not lose acknowledged messages or break per-key ordering.

Message QueuePub/SubReplication
KafkaRabbitMQ
Core Services
Unlock
ProMedium
Design a Load Balancer

Design a load balancer fronting a fleet of 1,000 backend servers, distributing 1M requests/sec of HTTPS traffic. Backends fail, deploy, and autoscale continuously, so the balancer must detect unhealthy instances within seconds and shift traffic without dropping in-flight requests. It must add well under a millisecond of overhead, and it cannot itself be a single point of failure for the entire service behind it.

Load BalancerHealth ChecksCaching
AWS ELBNGINX
Basics
Unlock
ProHard
Design a CDN

Design a content delivery network with 200 edge points of presence serving 50M requests/sec of static and streaming content globally. Origins can handle less than 2% of that traffic, so cache hit ratio is existential, not an optimization. A product launch can send 10M clients to the same uncached file within one second (thundering herd), and customers expect a purge to remove stale content worldwide in seconds.

CDNCachingGeospatial
CloudflareAkamai
Advanced
Unlock
ProMedium
Design a Web Crawler

Design a web crawler that maintains a corpus of 5B pages, fetching 15k pages/sec (about 1.3B/day) split between discovering new URLs and re-crawling changed ones. The crawl frontier holds tens of billions of URLs, yet the crawler must never hammer any single site: per-domain politeness caps throughput against small hosts while news sites need revisits within minutes. Traps, duplicates, and infinite URL spaces waste budget unless detected.

Web CrawlingSchedulingDistributed FS
GoogleBing
Advanced
Unlock
ProHard
Design a Distributed File System

Design a distributed file system in the spirit of GFS/HDFS for internal analytics: 100PB across 10,000 commodity nodes, dominated by multi-GB files written once and read many times by batch jobs pulling 10TB/hour each. With 10k nodes, disk and node failures happen daily, so replication and re-replication are steady-state behavior, not exceptions. A single metadata service tracking billions of chunks is the classic bottleneck to design around.

Distributed FSReplicationMetadata
HDFSCeph
Advanced
Unlock
ProHard
Design a Leader Election System

Design a coordination service providing leader election for 10,000 internal service clusters, in the spirit of ZooKeeper/etcd. Each cluster runs 3-9 replicas needing exactly one leader; when a leader dies, failover must complete in seconds because writes stall until it does. The defining hazard is split-brain: during a network partition, two nodes each believing they lead can corrupt data permanently, so safety must hold even when liveness cannot.

Leader ElectionConsensusDistributed FS
ZooKeeperetcd
Advanced
Unlock
ProMedium
Design a Configuration Management System

Design a configuration management service for 5,000 microservices across 100k instances: feature flags, service settings, and secrets references. Reads are cheap and constant (peaks of 500k reads/sec via local caches), but writes are dangerous - bad config pushes cause more outages than bad code. A change must propagate to 100k instances within 30 seconds, yet also be releasable gradually and reversible in seconds when it breaks something.

API DesignReplicationRollout
ConsulSpring Cloud Config
Basics
Unlock
ProMedium
Design a Secret Management System

Design a secret management service like HashiCorp Vault, used by 5,000 microservices and 2,000 engineers to store API keys, database credentials, and TLS certificates. The system holds 500k secrets and serves 50k secret reads/sec at peak, since every service fetches credentials on startup and rotation. The twist: a single master-key compromise must not expose the whole store, secrets must rotate without restarting consumers, and every access must be attributable in an audit trail.

EncryptionSecurityCompliance
VaultAWS Secrets Manager
Basics
Unlock
ProMedium
Design a CI/CD Pipeline

Design a CI/CD platform for a company with 2,000 engineers pushing to 500 repositories, including one large monorepo. The system runs 40k builds/day with peaks of 800 concurrent jobs after lunch-hour merges, and each build produces up to 2GB of artifacts and logs. The twist: median time from commit to production must stay under 30 minutes while flaky tests, cache invalidation, and unsafe deploys are the norm - the pipeline must make rollbacks and partial failures routine, not emergencies.

DeploymentAutomationAPI Design
JenkinsGitLab CI
Basics
Unlock
ProHard
Design a Microservices Architecture

Design the decomposition of a monolithic e-commerce application into microservices. The monolith serves 50M monthly users at 20k QPS peak, is developed by 300 engineers whose deploys now take 4 hours and regularly conflict, and owns a single 8TB relational database. The twist: migration must be incremental with zero downtime - the business ships features throughout - and you must decide service boundaries, data ownership, and how to keep orders consistent when a checkout spans 5 services.

API DesignService MeshEvent-Driven
NetflixUber
Advanced
Unlock
ProMedium
Design a GraphQL API

Design a GraphQL API layer that fronts 30 backend services for a social commerce app with 10M DAU. The API serves 8k QPS steady and 25k QPS at peak, and mobile clients depend on it to fetch a screen of data in one round trip. The twist: clients can compose arbitrary queries, so one request can fan out to dozens of services and millions of rows - you must bound query cost, kill the N+1 problem, and cache responses that no longer have simple URL keys.

API DesignCachingAPI Gateway
GitHubShopify
Core Services
Unlock
ProEasy
Design a REST API

Design the public REST API for a SaaS project-management product used by 50k companies. Third-party developers and internal web and mobile clients together generate 5k QPS steady with bursts to 15k QPS from integration syncs. The catalog covers 40 resource types with list endpoints over millions of rows. The twist: the API is a contract - thousands of integrations depend on it, so versioning, pagination, rate limiting, and error semantics must survive years of evolution without breaking clients.

API DesignRate LimitingSecurity
TwitterGitHub
Basics
Unlock
ProMedium
Design a WebSocket System

Design a WebSocket delivery platform powering live chat, presence, and real-time dashboards for a suite of consumer apps. The system holds 10M concurrent connections, delivers 500k messages/sec outbound, and a single hot channel (a live sports match) can fan out one message to 1M subscribers. The twist: connections are long-lived state on stateful servers - you must survive server deploys and failures without a reconnect storm, and guarantee ordered delivery per channel.

WebSocketsReal-timePub/Sub
SlackDiscord
Core Services
Unlock
ProHard
Design a Collaborative Editor

Design a real-time collaborative document editor like Google Docs. The service hosts 500M documents and 5M concurrently active editors; a busy document can have 100 people typing at once, and every keystroke must appear on collaborators' screens almost instantly. The twist: concurrent edits to the same text conflict - the system must guarantee every replica converges to the same document, support offline editing that merges cleanly on reconnect, and keep full edit history.

CRDT / OTReal-timeSync & Conflict
Google DocsNotion
Advanced
Unlock
ProHard
Design an Ad Serving System

Design an ad serving platform for a large publisher network. The system receives 500k ad requests/sec, runs a real-time auction among 200 demand partners for each impression, and serves 40B impressions/day. Advertisers set daily budgets from $10 to $1M. The twist: the entire auction - candidate selection, targeting, bidding, ranking - must finish inside a 100ms budget or the impression is wasted, and budget spend must be paced so a $1,000 daily budget does not evaporate by 9am or overspend when counters lag.

Ad ServingAuctionReal-timeMachine Learning
Google AdsMeta Ads
Advanced
Unlock
ProHard
Design a Personalized Feed

Design a personalized content feed for a social app with 200M DAU. The system answers 100k feed requests/sec at peak, ranking each user's feed from a corpus of 500M items where 50M new items arrive daily. Signals include follows, engagement history, and item freshness. The twist: the full corpus cannot be scored per request - you need candidate generation plus ranking inside a 200ms budget, fresh items must surface within minutes, and new users with no history still need a good feed.

Social FeedMachine LearningCachingSearch & Ranking
TikTokInstagram
ML-Infused
Unlock
ProMedium
Design a Feature Flag System

Design a feature flag service like LaunchDarkly used by 3,000 engineers across 400 services and mobile/web clients. SDKs evaluate flags 2M times/sec in aggregate, and the control plane holds 20k flags with targeting rules over user attributes. The twist: flag evaluation sits on every request's hot path, so it cannot add network latency - evaluation must be local - yet a kill switch flipped during an incident must reach every server and client worldwide within seconds.

RolloutAPI DesignCaching
LaunchDarklySplit
Basics
Unlock
ProHard
Design a Service Mesh

Design a service mesh for a platform running 3,000 services across 100k pods in 12 clusters, carrying 2M requests/sec of service-to-service traffic. Platform teams need uniform mTLS, retries, and traffic shifting without touching application code owned by 500 teams. The twist: the mesh sits on every hop, so the data plane can add at most 1ms per hop, and pushing routing config to 100k proxies must converge fast without a bad rule taking down the fleet.

Service MeshObservabilitySecurity
IstioLinkerd
Advanced
Unlock
ProMedium
Design a Distributed Tracing System

Design a distributed tracing system for a platform of 2,000 services emitting 5M spans/sec at peak. A single user request can traverse 40 services, and engineers use traces to debug p99 latency and error spikes. The twist: storing every span costs petabytes per week, but sampling uniformly at 1% throws away exactly the rare slow and failing traces engineers need - you must keep the interesting traces while dropping the boring ones, and assemble spans arriving out of order into complete traces.

ObservabilityAnalyticsService Mesh
JaegerZipkin
Advanced
Unlock
ProMedium
Design a Compliance Auditing System

Design a compliance auditing system for a fintech with 800 services, ingesting 100k audit events/sec - logins, data access, config changes, money movement. Regulators require 7-year retention (roughly 5PB) and auditors run investigations like 'every access to account X in 2023'. The twist: the log must be tamper-evident so even administrators cannot alter history, ingestion can never drop events during traffic spikes, and queries over years of data must return in minutes, not days.

ComplianceAnalyticsEncryption
Compliance tools
Basics
Unlock
ProMedium
Design a GDPR Compliant System

Design GDPR compliance infrastructure for a consumer SaaS with 80M EU users whose data spreads across 40 microservices, analytics warehouses, caches, search indexes, ML training sets, and backups. The company receives 5k data subject requests/day (export and deletion). The twist: 'right to erasure' must complete within 30 days across every derived copy - including backups and models - while consent changes must stop downstream processing quickly, and you must prove completion to a regulator.

ComplianceEncryptionData Pipeline
EU regulations
Basics
Unlock
ProHard
Design a Blockchain System

Design a blockchain ledger for a consortium of 50 banks settling interbank payments. The network must process 5k transactions/sec with participants who do not fully trust each other, and up to a third of nodes may be faulty or malicious. The twist: settlement demands deterministic finality in seconds (probabilistic finality is unacceptable for money), history must be immutable and auditable, yet transaction details must stay private between counterparties.

ConsensusReplicationEncryption
BitcoinEthereum
Advanced
Unlock
ProHard
Design an IoT Platform

Design an IoT platform managing 50M devices - smart meters, sensors, and industrial controllers - that publish 2M telemetry messages/sec (about 30TB/day). Devices sit on flaky cellular links, go offline for days, and run firmware that must be updated remotely. The twist: the fleet is too large for manual care - provisioning, authentication, and firmware rollout must be fully automated, a bad firmware push can brick millions of devices, and per-device command latency still matters for control use cases.

IoTPub/SubAnalyticsReal-time
AWS IoTGoogle IoT
Advanced
Unlock
ProHard
Design an AR/VR System

Design the backend for a multiplayer AR/VR platform hosting shared 3D spaces. The service supports 500k concurrent users in sessions of up to 60 people, syncing head, hand, and object state at 60Hz per user. The twist: comfort physics are unforgiving - motion-to-photon must stay under 20ms locally and shared-object interactions need under 100ms round trip, so you must decide what runs on device, what runs at the edge, and how to reconcile conflicting physics when two users grab the same object.

StreamingReal-timeVideo
OculusMagic Leap
Advanced
Unlock
ProHard
Design a Quantum Computing System

Design a cloud quantum computing platform like IBM Quantum, giving 100k researchers access to a fleet of 50 QPUs through a job API. Users submit 500k circuit jobs/day, most as hybrid workflows that loop between classical optimization and quantum execution. The twist: QPUs are scarce, wildly heterogeneous, and drift out of calibration every few hours - the scheduler must match circuits to qubit topologies, batch around recalibration windows, and keep queue times fair when one flagship machine gets 80% of demand.

SchedulingDistributed FS
IBM QuantumGoogle Quantum
Advanced
Unlock
ProHard
Design a Metaverse Platform

Design a metaverse platform hosting persistent virtual worlds for 10M concurrent users. Worlds are seamless spaces where a popular event can draw 100k users to one venue, and users own tradeable items in an economy moving $5M/day. The twist: no single server can simulate 100k co-located users, so the world must be sharded while feeling continuous, and the economy demands transactional integrity - item duplication exploits are theft - while avatar and voice interactions need sub-150ms latency.

Real-timeSync & ConflictObject Storage
MetaDecentraland
Advanced
Unlock
ProHard
Design a Brain-Computer Interface

Design the software platform for an implanted brain-computer interface that lets paralyzed patients control cursors and speech synthesis. Each of 10k patients has a 1,024-channel implant sampling at 30kHz - about 1GB/hour raw - feeding a decoder that turns neural activity into intent. The twist: control must feel instantaneous (under 100ms signal-to-action) on a power-constrained implant, decoders drift and need continual recalibration, and neural data is the most sensitive personal data imaginable.

Real-timeStreamingAnalytics
NeuralinkKernel
Advanced
Unlock
ProMedium
Design a Space Debris Tracking System

Design a space debris tracking system that protects 8,000 active satellites from collisions. A global network of radars and telescopes produces 1M observations/day covering 40k cataloged objects (and growing as fragmentation events add thousands at once). The twist: orbits are predictions with growing uncertainty - the system must propagate 40k orbits continuously, screen 800M object pairs/day, and issue alerts 72 hours ahead precise enough that operators do not dismiss them as false alarms.

GeospatialReal-timeAnalytics
NASAESA
Edge Cases
Unlock
ProHard
Design a Personalized Learning Platform

Design an adaptive learning platform serving 20M K-12 students, with 1M concurrent learners at after-school peak. The system models each student's mastery across 5k skills from 50M practice answers/day and picks the next question in real time. The twist: adaptivity is the product - next-item selection must balance estimated mastery against what maximizes learning, respond in under 300ms, avoid trapping students in remediation loops, and give teachers explainable reports, not a black box.

Machine LearningAnalyticsRecommendations
CourseraKhan Academy
ML-Infused
Unlock
ProHard
Design a Climate Model Simulator

Design a climate model simulation platform for a research consortium of 2,000 scientists. Ensemble runs simulate the planet on a 10km grid across 100-year horizons, each run consuming 50k CPU cores for weeks and an ensemble producing 5PB of output. The twist: jobs run for weeks on failure-prone hardware, so checkpoint/restart is existential; scientists need to explore petabyte outputs interactively without downloading them; and results must be bit-reproducible for peer review years later.

Data PipelineAnalyticsBatch Processing
NOAAIPCC
ML-Infused
Unlock
ProHard
Design a Global Supply Chain Optimizer

Design a supply chain optimization platform for a global manufacturer with 500 factories, 10k suppliers, and 200 distribution centers moving 2M shipments/month. The system plans production, inventory, and routing across the network. The twist: the underlying optimization is NP-hard at this scale, yet disruptions - a port closure, a supplier failure - arrive continuously and demand replanning in minutes, not the 8 hours a full solve takes, while planners need to trust and override the recommendations.

AnalyticsSchedulingGraph Algorithms
DHLAmazon
Advanced
Unlock
ProMedium
Design a Zero-Trust Network

Design a zero-trust access platform for an enterprise of 100k employees and 5k internal applications, replacing the VPN-and-flat-network model. Every request must be authenticated and authorized - about 1M authorization decisions/sec at peak - using identity, device posture, and context. The twist: the policy check sits on every request, so it must add under 10ms; a compromised laptop must be cut off within a minute; and the system becomes the choke point whose outage locks out the company.

SecurityEncryptionAPI Gateway
GoogleMicrosoft
Basics
Unlock
ProMedium
Design a Carbon Footprint Tracker

Design a carbon accounting platform for enterprises reporting under CSRD and investor mandates. A typical customer tracks emissions across 200 facilities, 50k suppliers, cloud usage, and business travel - about 10M activity records/month per customer across 500 customers. The twist: most emissions are Scope 3 estimates from spend data and industry factors, so the system must track uncertainty per figure, recompute history when factors are revised, and produce numbers an external auditor will sign.

AnalyticsData PipelineIoT
Green tech
Edge Cases
Unlock
ProMedium
Design a Sustainable Data Center

Design the systems for a 100MW data center targeting a PUE of 1.1, housing 100k servers. Power comes from a mix of grid, on-site solar, and batteries, and the operator commits to 24/7 carbon-free energy matching. The twist: renewable supply and compute demand peak at different hours - the platform must shift flexible workloads to when and where clean power is available, modulate cooling against weather in real time, and do all of it without ever breaching workload SLOs or thermal limits.

AnalyticsSchedulingIoT
GoogleMicrosoft
Basics
Unlock
ProHard
Design a Federated Learning System

Design a federated learning platform used by a mobile keyboard app to improve its next-word prediction model across 100M devices without raw keystrokes ever leaving the phone. Each training round samples 5k-50k devices, ships a 20MB model, and aggregates updates within an hour. Devices are unreliable (30% drop mid-round), bandwidth is scarce, and no individual device's update may be reconstructible, so aggregation must be both privacy-preserving and straggler-tolerant.

Machine LearningEncryptionDistributed FS
GoogleApple
ML-Infused
Unlock
ProHard
Design an Explainable AI System

Design an explainability service for a bank that scores 2M loan and credit-card applications per day with ML models. Every automated decision must ship with a human-readable explanation of its top factors, and regulators can demand the exact explanation for any decision up to 7 years later. Explanations must be generated at decision time without blowing the 200ms scoring budget, stay consistent when models are retrained, and be reproducible end to end for audits.

Machine LearningAnalyticsCompliance
OpenAIGoogle
ML-Infused
Unlock
ProMedium
Design a Vector Database

Design a vector database that powers semantic search and recommendations for an e-commerce company. It stores 1B 768-dimension embeddings (about 3TB raw), serves 10k similarity queries/sec, and ingests 50M new or updated vectors per day as the catalog changes. Exact nearest-neighbor search is too slow at this size, so the system must trade a little recall for speed — while supporting metadata filters (price, category) that can exclude most of an index shard.

Vector DBSearch & RankingIndexing
PineconeWeaviate
Advanced
Unlock
ProHard
Design a Multi-Modal Search Engine

Design a multi-modal search engine for a media platform where 200M users search across 500M items — product photos, videos, podcasts, and text descriptions — using free-text queries or an uploaded image. The system serves 5k QPS, indexes 10M new items/day, and must merge results from different modalities into one relevance-ordered list, which means scores produced by separate encoders have to be made comparable before ranking.

Search & RankingMachine LearningVector DB
GoogleBing
ML-Infused
Unlock
ProHard
Design an Autonomous Agent Orchestrator

Design an orchestrator for autonomous AI agents at a company running 100k concurrent agent tasks — coding assistants, research agents, workflow bots — each making LLM calls and tool invocations. A single task can spawn sub-agents, run for hours, and burn real money in tokens. The system must schedule work across rate-limited model providers, enforce per-task budgets and tool permissions, and recover mid-task when an agent, worker, or provider fails.

AI AgentsLLMOrchestration
OpenAIAnthropic
Advanced
Unlock
ProHard
Design a Generative AI Content Moderator

Design a moderation pipeline for a platform whose users create 20M AI-generated images and 100M generated text snippets per day. Content must be screened before public display — for policy violations, CSAM, and impersonation — without adding more than a second to the generation experience. Adversarial users constantly probe prompts to slip content past filters, so the system needs layered detection, human review for the gray zone, and feedback loops that improve classifiers within days.

Content ModerationMachine LearningLLM
OpenAIStability AI
ML-Infused
Unlock
ProHard
Design a RAG System

Design a retrieval-augmented generation system that lets 50k employees ask questions over 20M internal documents — wikis, tickets, PDFs, roughly 5TB of text. It serves 200 queries/sec at peak, must ground every answer in retrieved sources with citations, and must reflect document edits within 5 minutes. The twist is access control: each user may only retrieve from documents they are entitled to see, and permissions change constantly across thousands of groups.

RAGVector DBLLM
LangChainPinecone
ML-Infused
Unlock
ProHard
Design a Conversational AI Platform

Design a conversational AI platform that 10k businesses use to build customer-support chatbots and voice assistants. It handles 5M conversations/day, about 40M turns, each combining intent understanding, dialog state, tenant-specific knowledge, and actions like refunds or booking changes. Tenants bring their own content and integrations; one tenant's traffic spike or misbehaving bot must not degrade others, and conversation state must survive a switch from web chat to phone.

LLMReal-timeMessaging
DialogflowRasa
ML-Infused
Unlock
ProHard
Design a Real-Time Analytics System

Design a real-time analytics system for a consumer app emitting 2M clickstream events/sec at peak, about 100TB/day. Product teams build dashboards over the stream — funnels, top-N, unique users — and expect a chart to reflect an event within 5 seconds. Queries must scan hours of recent data in under a second, late and duplicate events are routine because mobile clients retry offline batches, and the numbers must reconcile with the exact batch counts used for revenue reporting.

AnalyticsStream ProcessingReal-time
SnowflakeDatabricks
Advanced
Unlock
ProMedium
Design a Data Lake

Design a data lake centralizing analytics data from 200+ sources — application events, database change streams, third-party feeds — growing 50TB/day toward 10PB total. Thousands of analysts and hundreds of pipelines hit it with SQL and ML training jobs. The twist is governance at scale: schemas evolve weekly, datasets need discoverability and lineage, a GDPR request must delete one user's rows from petabytes of append-oriented storage, and storage cost has a hard budget.

Data PipelineObject StorageETL
AWSAzure
Advanced
Unlock
ProMedium
Design a Data Warehouse

Design a cloud data warehouse for a retailer with 500TB of history across orders, inventory, and marketing. 3k analysts run 50k queries/day — from sub-second dashboard lookups to hour-long scans — while 400 ETL jobs load 2TB nightly and near-real-time feeds trickle in all day. The twist is workload isolation: a single runaway analyst query must not delay executive dashboards or jeopardize the nightly load SLA, and compute cost must be attributable per team.

ETLAnalyticsData Pipeline
RedshiftBigQuery
Advanced
Unlock
ProMedium
Design a ETL Pipeline

Design an ETL pipeline consolidating data from 50 sources — production database replicas, SaaS APIs, event logs — into an analytics warehouse, moving 2TB/day. Downstream teams depend on tables landing by 6am for daily reporting. Sources fail routinely: APIs rate-limit, schemas drift, files arrive late or malformed. The pipeline must catch bad data before it propagates, backfill history when logic changes, and rerun any step without double-counting a single row.

ETLData PipelineScheduling
TalendInformatica
Basics
Unlock
ProMedium
Design a Backup and Recovery System

Design a backup and recovery system for a company running 2k databases and 5PB of file storage across two data centers. The business requires an RPO of 15 minutes for critical databases and restore of a 1TB database in under 4 hours. The twist: backups are only as good as their restores, so the system must continuously prove recoverability with automated test restores, resist ransomware that tries to delete backups, and keep storage cost bounded through retention tiers.

ReplicationObject StorageHigh Availability
VeeamCommvault
Basics
Unlock
ProHard
Design a Disaster Recovery System

Design disaster recovery for a payments company running its core stack — databases, queues, 200 microservices — in a single region today. The mandate: survive a full regional outage with an RTO of 15 minutes and an RPO of 1 minute for transactional data. Failover must be regularly exercised in production so it works when needed, and the hardest part is the decision itself: distinguishing a real regional failure from a network partition while guaranteeing no split-brain writes.

High AvailabilityReplicationFailover
AWS DRAzure DR
Advanced
Unlock
ProHard
Design a High-Availability System

Take a checkout API doing 20k requests/sec and raise it from 99.9% to 99.99% availability — a budget of 52 minutes of downtime per year that must cover deploys, dependency failures, and bad configs. The system spans 3 availability zones and depends on a database, a cache, and 5 downstream services. Incident history shows most outages come from change, not hardware, and every extra nine multiplies cost — the design must justify where redundancy is actually worth it.

High AvailabilityReplicationLoad Balancer
NetflixAmazon
Advanced
Unlock
ProMedium
Design a Scalable API Gateway

Design an API gateway fronting 2k microservices for a company serving 500k requests/sec at peak. Every external request flows through it for routing, authentication, rate limiting, and observability — so its overhead budget is tiny (p99 added latency under 10ms) and its availability must exceed that of any service behind it. Configuration changes — new routes, new limits — land hundreds of times a day and must propagate in seconds without dropping in-flight requests.

API GatewayRate LimitingLoad Balancer
KongApigee
Core Services
Unlock
ProMedium
Design a Event-Driven Architecture

Design an event-driven backbone decoupling 300 services at an e-commerce company: order placed, payment captured, inventory reserved, shipment created. The bus carries 100k events/sec at peak, and consumers range from real-time fraud checks to nightly analytics. The twist is the guarantees: consumers must never miss an event, duplicates are unavoidable, ordering matters per order ID, and a brand-new service must be able to replay a year of history to bootstrap its state.

Event-DrivenPub/SubMessage Queue
EventbriteStripe
Advanced
Unlock
ProHard
Design a Saga Pattern Implementation

Design the distributed transaction flow for a travel platform where one booking spans four services: flight, hotel, car rental, and payment. Peak load is 50k bookings/hour; each step can fail or hang (an airline API times out after 30 seconds), and there is no shared database — all-or-nothing must be achieved with compensating actions. Partial states are visible to users mid-flow, money is involved, and a crashed coordinator must never leave a customer charged for a trip that never booked.

SagaEvent-DrivenIdempotency
Microservices patterns
Advanced
Unlock
ProMedium
Design a Circuit Breaker Pattern

Design a circuit breaker layer for a microservices platform where 500 services call each other at a combined 200k RPS. When a downstream slows — p99 jumping from 50ms to 30 seconds — callers exhaust their thread pools and the whole call graph collapses; a real incident like this took the site down for 40 minutes. The mechanism must detect failing dependencies within seconds, fail fast with fallbacks, and probe for recovery, all without flapping between states.

Circuit BreakerResilienceObservability
Netflix Hystrix
Basics
Unlock
ProMedium
Design a Strangler Fig Migration

Plan the migration of a 15-year-old retail monolith — 2M lines of code serving 30k RPS and acting as the system of record for orders — to microservices, without a big-bang rewrite. The business will not accept a feature freeze or downtime, so functionality moves incrementally: route by capability, run old and new side by side, compare outputs, and keep data consistent while both systems write to overlapping domains. Rolling back any migrated slice must take minutes, not days.

Strangler FigAPI GatewayEvent-Driven
Migration strategies
Basics
Unlock
ProMedium
Design a Blue-Green Deployment

Design a blue-green deployment system for a company shipping 200 releases/week, whose largest service handles 50k RPS. Each deploy stands up the new version beside the old, shifts traffic, and must be reversible in seconds when error rates spike. The hard parts: in-flight requests and sticky sessions during the switch, database schema changes that both versions must tolerate simultaneously, and the cost of running double capacity for every single deploy.

Blue-Green DeployDeploymentHigh Availability
Deployment strategies
Basics
Unlock
ProHard
Design a Flash Sale System

Design a flash sale system for a retailer dropping 10k units of a hyped sneaker at a fixed time. 5M users arrive in the first minute — 500k requests/sec at peak — against inventory that must never oversell. Bots outnumber humans 10 to 1, checkout takes minutes while stock holds tick down, and fairness is a product requirement: first-come-first-served or lottery, one unit per customer, and the rest of the site must stay up while a single SKU takes the entire load.

E-commerceCachingRate LimitingInventory
TicketmasterAmazon
Advanced
Unlock
ProHard
Design a Payment System

Design a payment system for a marketplace processing 10M transactions/day — about 300/sec average and 3k/sec on sale days — across cards, wallets, and bank transfers through multiple external processors. Money must never be lost or double-charged: clients retry, processors time out with unknown outcomes, and webhooks arrive late or twice. Every cent must reconcile daily against processor statements, and the ledger must withstand audits years later.

PaymentsIdempotencyConsistencySecurity
StripePayPal
Core Services
Unlock
ProEasy
Design an LRU Cache

Design an LRU cache: a fixed-capacity in-memory key-value store that evicts the least-recently-used entry when full. It sits on the hot path of a service handling 1M get/put operations/sec, so every operation must complete in O(1) time. The follow-ups make it interesting: correct behavior when multiple threads read, write, and evict concurrently; optional per-key TTL expiry; and keeping eviction order exact without a single global lock becoming the bottleneck.

CachingData Structures
GoogleAmazonMeta
Basics
Unlock