Real Systems
Stop reading. Build. 19 complete systems on the drafting canvas, plus 12 low-level design problems with graded answers.
Units on this floor
- URL shortener13.01 · Lab
Users submit a long URL and get a short code back. Anyone hitting the short code is redirected. Reads dominate overwhelmingly and must be fast everywhere.
- Typeahead search13.02 · Lab
As the user types, return the most popular completions of their prefix. Suggestions come from what people actually searched for, so the index must be rebuilt from query logs.
- News feed13.03 · Lab
Each user sees a reverse-chronological feed of posts from accounts they follow. A handful of accounts have tens of millions of followers.
- Chat messaging13.04 · Lab
One-to-one and group messaging with delivery receipts, offline delivery, and permanent history. Clients hold live connections when the app is open and get push notifications when it is not.
- Ride hailing13.05 · Lab
Riders request a ride from a location. The system finds nearby available drivers, offers the trip, and tracks the vehicle live until drop-off.
- Video streaming13.06 · Lab
Creators upload video. Viewers stream it worldwide at a quality matched to their connection. Bandwidth, not compute, is the dominant cost.
- Payment ledger13.07 · Lab
Move money between accounts. Every movement must be auditable, balanced, and impossible to duplicate — including when the network fails mid-request and the client retries.
- Notification fanout13.08 · Lab
Other services request notifications. The system respects user preferences and quiet hours, deduplicates, and delivers by push, email or SMS with retries.
- Multi-tenant SaaS13.09 · Lab
A B2B application serving thousands of customer organisations from shared infrastructure. Every request belongs to exactly one tenant, no tenant may ever observe another's data, and the…
- Inventory and booking13.10 · Lab
Tickets go on sale at a fixed instant. Two hundred thousand people arrive in the same minute for fifty thousand seats. Overselling is unacceptable. Showing slightly stale availability is…
- Metrics pipeline13.11 · Lab
Application and device telemetry arrives continuously. Engineers query it on dashboards over windows from the last five minutes to the last two years. Ingest must never block the systems…
- Distributed scheduler13.12 · Lab
Other services register work to happen later: send this reminder in 30 minutes, expire this order in 15, retry this webhook with backoff. Millions of jobs are pending at any moment and…
- Collaborative editor13.13 · Lab
Many people edit one document at the same time, from browsers and phones, some on poor connections. Everyone converges on the same document, edits made while offline are not lost, and…
- Search with reindex13.14 · Lab
A product catalogue served by full-text search. The catalogue changes constantly, the index must reflect changes within seconds, and changing the analyzer or the field mapping requires…
- Web crawler13.15 · Lab
Fetch a billion pages a month, extract their links, and keep going — without fetching the same URL twice, without hammering any single site, and without losing the frontier when a worker…
- Async invoicing pipeline13.16 · Lab
Every order must be registered with a government e-invoicing portal that returns a reference number before the invoice is legally valid. The portal is slow, rate-limited, and least…
- Semantic search at scale13.17 · Lab
A knowledge platform ingests ten million documents a day, chunks and embeds them, and answers natural-language questions over the last ninety days. Answers must cite real passages, and the…
- Splitting the monolith13.18 · Lab
Payments live inside a monolith, in tables the rest of the application joins against freely. The business wants payments extracted into a service with its own store. Nothing may stop…
- The egress bill13.19 · Lab
The cloud bill for data transfer went up sixteen times in one month. Product traffic is flat, no feature shipped, and the only change was an infrastructure one: the fleet was spread across…
- Parking lot13.20 · Dojo
Multi-level lot. Spot sizes for bike, car and truck. Vehicles get a ticket on entry and pay on exit. Pricing rules change often, and management wants to experiment with allocation policy.
- Elevator bank13.21 · Dojo
Four elevators, twenty floors. External buttons call an elevator with a direction; internal buttons choose a destination. The dispatch algorithm needs to be swappable.
- Rate limiter class13.22 · Dojo
A reusable rate limiter for an API tier. Different endpoints need different algorithms, limits are per API key, and it runs on many servers at once.
- Splitwise ledger13.23 · Dojo
Track shared expenses in a group. An expense is paid by one or more people and split among several, equally, by exact amount, or by percentage. The app shows who owes whom.
- Vending machine13.24 · Dojo
Accepts coins and notes, dispenses a product, returns change. Must handle insufficient funds, sold-out items, cancellation, and running out of change.
- Cache with eviction13.25 · Dojo
An in-process cache with a fixed capacity, O(1) get and put, pluggable eviction policy, per-entry TTL, and safety under concurrent access.
- Circuit breaker13.26 · Dojo
A circuit breaker wrapping every call to a flaky payment provider. It must stop hammering a dependency that is already down, probe carefully for recovery, and be shared safely by every…
- Connection pool13.27 · Dojo
A connection pool in front of a database that accepts a hard maximum of 100 connections. Callers borrow, use and return. It must survive callers that throw, and it must not become the…
- Retry policy13.28 · Dojo
A retry policy shared by every outbound HTTP client in the service. It must let a dependency have a bad minute without turning it into a bad hour, and it must never retry a request that…
- Delayed job queue13.29 · Dojo
A delayed job queue: "send this reminder in 30 minutes", "time this order out in 15". Millions of pending jobs, several worker processes competing for them, and nothing may be lost when a…
- Idempotency middleware13.30 · Dojo
Middleware that makes POST /payments safe to retry. Clients send an Idempotency-Key header, and the same key must never produce a second charge — including when two retries arrive in the…
- In-process event bus13.31 · Dojo
A publish/subscribe bus inside one process. Modules publish domain facts — OrderPlaced, UserRegistered — and any number of handlers in the same application react. No broker, no network…