MentorNode
Start free

Sandbox

System Design

Drag real components — CDNs, load balancers, caches, queues, sharded databases, inference tiers — onto a canvas to solve classic scale problems, then get a Socratic review of your diagram.

challenges
66
sections
12
patterns
246
components
35

Foundations & Core Patterns

8

The primitives every other design reuses — hashing, ID generation, throttling, and failure isolation.

Design a highly available distributed service that compresses long URLs into 7-character aliases and redirects users with sub-10ms latency.

100M writes/day (1,200 QPS)Open

Design a low-latency API rate-limiting tier that protects downstream microservices from traffic spikes, DDoS, and noisy neighbors across global regions.

1,000,000 requests/secondOpen

Design a service that hands out 64-bit, roughly time-ordered, globally unique identifiers without a central database sequence becoming a bottleneck.

1M IDs/second across 1,024 nodesOpen

Design the routing layer that maps billions of keys onto a changing set of storage nodes, so that adding or losing a node moves the minimum possible data.

500 storage nodesOpen

Design the mechanism that lets a client safely retry any mutating request — after a timeout, a crash, or a duplicate webhook — without the effect happening twice.

50k mutating requests/secondOpen

Design the single front door for a microservice fleet: authentication, routing, aggregation, and versioning, without becoming the bottleneck or the outage.

300k RPSOpen

Design the cluster membership layer: services find each other as instances come and go, and exactly one instance holds a leadership lease at any moment.

20,000 instancesOpen

Caching & Content Delivery

4

Read paths that never reach the origin: edge caches, cache-aside, invalidation, and stampede control.

Design a global edge network that serves static and cacheable dynamic content from a PoP near the user, while keeping the origin from ever seeing the traffic.

300 PoPsOpen

Design the in-memory tier itself: how keys are partitioned across nodes, what gets evicted, and what happens to correctness when a node disappears mid-traffic.

10 TB of cached dataOpen

Design the read path for an API with a 100:1 read-to-write ratio, where the hard part is not caching — it's deciding when a cached value stops being true.

200k reads/secondOpen

Design where login state lives for a multi-region app: fast enough to check on every request, revocable within seconds, and surviving a region loss.

80M active sessionsOpen

Data, Storage & Consistency

8

Replication, partitioning, transactions across services, and choosing what to give up under CAP.

Design an always-writable key-value store that survives node and datacenter loss, resolves concurrent writes, and repairs its own divergence in the background.

100 TBOpen

Design how a single Postgres primary that has run out of headroom becomes a sharded fleet — including the migration, the cross-shard queries, and the failover story.

20 TBOpen

Design a booking flow that spans payment, inventory, and notification services, where there is no shared transaction to roll back — only compensations you have to write yourself.

5k multi-service transactions/secondOpen

Design a system whose source of truth is an append-only event log, with read models projected from it — and work out what that costs when a projection is wrong.

500M events/dayOpen

Design the pipeline that keeps a search index, a cache, and a warehouse in step with the primary database — without any service dual-writing to both.

80k row changes/secondOpen

Design durable blob storage for exabytes of immutable objects: how bytes are placed, how eleven nines of durability is achieved, and where the metadata lives.

10 ExabytesOpen

Design a system that accepts writes in three regions at once, keeps them converging, and survives losing an entire region — deciding explicitly what CAP property to give up.

3 regionsOpen

Design storage for a billion metric points an hour: append-only writes, range queries over arbitrary windows, and a cardinality problem that will eventually try to kill you.

2M data points/secondOpen

Messaging & Event-Driven

5

Queues, brokers, fanout, scheduling, and getting delivery guarantees you can actually reason about.

Design the broker itself: a partitioned, replicated, append-only log that guarantees ordering within a partition and lets consumers rewind.

5M messages/secondOpen

Design one-to-many event distribution where a single publish reaches hundreds of independent subscribers, each of whom may be slow, broken, or temporarily gone.

200k publishes/secondOpen

Design cron for a fleet: recurring and one-off jobs that fire close to on time, exactly once, and keep firing when the node that owned them disappears.

50M scheduled jobsOpen

Design outbound event delivery to customer-controlled HTTP endpoints — the ones that are slow, occasionally down, sometimes malicious, and always someone else's problem to fix.

300k events/secondOpen

Design one service that delivers push, SMS, email, and in-app notifications — with user preferences, quiet hours, deduplication, and third-party providers that fail independently.

500M notifications/dayOpen

Real-Time & Collaboration

5

Persistent connections, presence, conflict resolution, and sub-second state shared between users.

Design a scalable real-time messaging architecture supporting 1-on-1 chats, group channels, online presence, and offline push notifications.

500M Daily Active UsersOpen

Design concurrent editing where twenty people type into the same paragraph at once, every client converges on the same document, and nobody's keystroke is lost.

10M concurrent documentsOpen

Design live broadcast at scale: a streamer's RTMP ingest becomes an adaptive ladder delivered to millions of viewers within seconds, with synchronized chat.

100k concurrent streamsOpen

Design the green dot: who is online, who is typing, and who just disconnected — for hundreds of millions of users whose connections drop without warning.

50M concurrent usersOpen

Design the authoritative simulation for a competitive game: tick-rate state sync, lag compensation, cheat resistance, and matchmaking that fills lobbies fast and fairly.

2M concurrent playersOpen

Social, Feed & Engagement

5

Fanout on write vs read, social graphs, ranking, counters, and the celebrity-user problem.

Design the timeline: assemble a personalized, ranked feed in under 200ms for users who follow thousands of accounts, some of which have 100 million followers.

300M DAUOpen

Design upload-to-feed for photos and short video: derivative generation, metadata storage, feed fanout, and delivery that keeps a mobile scroll smooth on a bad connection.

500M DAUOpen

Design storage and query for follows, friends, and blocks: bidirectional lookups, friends-of-friends traversal, and accounts with a hundred million edges.

2B usersOpen

Design threaded discussion: deeply nested replies, live vote counts, multiple sort orders, and a hot thread where ten thousand people comment in the same minute.

50M comments/dayOpen

Design global and per-segment rankings that update live for millions of players, answering both 'top 100' and 'what is my rank' without scanning the whole set.

100M ranked playersOpen

Geo, Maps & Marketplaces

5

Spatial indexing, live location streams, and matching supply to demand in a moving market.

Design the matching core: millions of drivers streaming location updates, riders requesting nearby cars, and a dispatch decision that must be made in seconds and never double-assign.

5M active driversOpen

Design 'what's near me' over hundreds of millions of mostly-static places: radius search, category filters, and ranking, at read volumes that dwarf the write rate.

200M placesOpen

Design a three-sided marketplace where an order's success depends on a restaurant, a courier, and a customer staying in sync through a multi-stage, failure-prone workflow.

2M orders/dayOpen

Design inventory where overselling is unacceptable: holds that expire, searches across a huge date-and-price space, and a payment step that happens after the seat is already claimed.

10M propertiesOpen

Design turn-by-turn routing over a continental road graph: precomputed shortcuts, live traffic that changes edge weights, and map tiles served from the edge.

100M road segmentsOpen

Commerce, Payments & Ledgers

6

Money movement where correctness beats availability — idempotency, reconciliation, and flash-sale contention.

Design money movement where a duplicate charge is a headline: idempotent charge requests, asynchronous provider webhooks, and daily reconciliation against the processor's ledger.

10k payments/second peakOpen

Design the accounting core: an immutable journal where every transfer balances to zero, balances are derived rather than stored, and no concurrent transfer can overdraw an account.

50k transfers/secondOpen

Design cart-to-order for a large catalog: persistent carts across devices, inventory counts that are read constantly and decremented atomically, and checkout that survives partial failure.

50M SKUsOpen

Design for the worst traffic shape there is: a million people hitting one endpoint at 10:00:00 for fifty thousand seats, each of which may be sold exactly once.

1M concurrent users at on-saleOpen

Design click ingestion and near-real-time aggregation where the numbers are billed: deduplicated events, late arrivals, fraud filtering, and a batch layer that corrects the stream.

1M clicks/second peakOpen

Design recurring revenue: metered usage aggregated per customer, plan changes prorated mid-cycle, invoices generated on schedule, and failed payments retried without losing the customer.

5M subscribersOpen

Media & Large-Scale Files

4

Multi-gigabyte uploads, transcoding pipelines, chunked sync, and adaptive delivery.

Design an end-to-end video upload, transcoding, and adaptive bitrate streaming platform capable of delivering HD content to global audiences.

1 Billion Active UsersOpen

Design multi-device file sync: content-addressed chunks, delta uploads for a one-byte edit in a 2 GB file, and a conflict story for two devices editing offline.

500M usersOpen

Design the path from a user's camera roll to a fast-loading image: direct upload, validation, derivative generation, format negotiation, and edge delivery.

200M uploads/dayOpen

Design uploads that survive a two-hour transfer on a flaky connection: parts uploaded in parallel, verified independently, and resumable from where the client stopped.

Files up to 5 TBOpen

Platform & Infrastructure

6

The systems that run the other systems: metrics, tracing, deploys, config, and identity.

Design the system that tells you the other systems are broken: metric collection from a huge fleet, rule evaluation at interval, and alert routing that doesn't page ten people for one outage.

50k hostsOpen

Design centralized logs and traces for a microservice fleet: ship, buffer, index, and search terabytes a day, with trace context that survives every network hop.

10 TB logs/dayOpen

Design build and release for a large monorepo: a scheduler that only rebuilds what changed, ephemeral runners, artifact promotion, and deploys that roll back on their own.

5k builds/dayOpen

Design runtime configuration that changes behaviour in seconds without a deploy — evaluated locally at nanosecond cost, and safe when the config service is unreachable.

10k flag evaluations/second per service instanceOpen

Design identity for a platform: login, token issuance, permission checks on every request, and revocation that actually takes effect before the token expires.

200M usersOpen

Design how a build reaches a hundred thousand machines across every region: efficient artifact distribution, staged waves gated on health, and a rollback that beats the outage.

100k hostsOpen

AI / ML Infrastructure

5

Inference serving, retrieval, embeddings, and feature pipelines — the architecture, not the modelling.

Design the serving tier for models on expensive accelerators: request batching, version rollout, autoscaling that accounts for cold starts, and a fallback when the GPU pool is saturated.

50k inference requests/secondOpen

Design retrieval-augmented generation over documents users own: ingestion and embedding, hybrid retrieval with reranking, and permission filtering that never leaks across tenants.

100M documentsOpen

Design approximate nearest-neighbour search at billion-vector scale: index structure, recall against latency, quantization, and the awkwardness of updating an ANN index in place.

2B vectorsOpen

Design the store that serves the same feature values to training and inference — the layer whose absence produces models that score well offline and fail in production.

5k featuresOpen

Design the in-house front door to several model providers: token-based quotas, per-tenant budgets, caching, failover, and streaming responses that make cancellation meaningful.

20k concurrent streamsOpen