System Design · Workspace
Interview prep
What interviews ask, mock interviews to practise on, the design problems from across the course and the numbers worth knowing by heart. 11 interview lessons, 36 design problems, 6 key numbers.
System design interviews11
- Interview skills
How design interviews are evaluated
A design interview gives you limited time to explain engineering decisions. Understanding what your explanation makes observable helps you prepare beyond memorizing architectures. - Interview skills
A 45-minute interview frameworkFree
A short design discussion forces you to choose what deserves detail. This framework helps you make those choices visible in interviews and technical reviews. - Interview skills
Clarifying requirements in an interview
A technically sound design can solve the wrong problem. Clarifying scope, failure behavior and priorities helps you avoid that mistake in interviews and engineering discussions. - Interview skills
Estimation under time pressure
A short design discussion leaves little time for arithmetic. Useful estimates expose constraints without turning uncertain inputs into false promises about capacity. - Interview skills
Presenting the high-level design
An architecture drawing is useful only when another engineer can follow its behavior. This skill helps in design interviews, architecture reviews and discussions across teams. - Interview skills
Deep dives and tradeoff discussions
A design review often turns on one difficult question, not the whole architecture. Practising focused explanations helps you expose unsafe assumptions and make decisions others can evaluate. - Interview skills
Handling follow-up questions and pushback
Design discussions rarely end with the first proposal. You need to explain what survives a challenge, what must change, and what evidence would settle an uncertain choice. - Interview skills
Common interview mistakes
A design discussion needs more than a plausible diagram. These habits help you explain decisions, expose gaps and respond usefully when another engineer challenges your assumptions. - Mock interview
Mock interview: URL shortener
A small-looking service exposes important engineering choices: who owns uniqueness, how much stale data is acceptable, and what happens when an optimization fails. This mock helps you explain those choices without hiding behind component names. - Mock interview
Mock interview: chat application
Chat combines durable writes with connections that disappear without warning. Designing it tests whether your guarantees still hold when a request succeeds but its response never arrives. - Interview skills
Self-review: scoring your own answer
Practice is useful when it reveals what to change. An evidence-based review helps you improve your reasoning without memorizing one model architecture.
Design problems 36
- Module 1 · System design fundamentals
Design: a URL shortener on a single server
Small services still need correct concurrency, clear failure behavior and resource limits. A URL shortener lets you practice those decisions without adding a distributed architecture. - Module 2 · Networking, APIs and load balancing
Design: a food delivery API
Mobile APIs must handle lost responses, old clients and concurrent actions. Food delivery brings these problems together: a customer needs one dinner, the restaurant needs an unambiguous order, and every screen needs the same current state. - Module 3 · Authentication, authorization and security
Design: login and single sign-on
Login crosses browser, application, database and identity-provider boundaries. A design must preserve those boundaries during retries, deployments and account changes, not only during a successful sign-in. - Module 4 · SQL databases: modeling, indexing and transactions
Design: a key-value store built on SQL
Many services need small values addressed by a key, not a new database product. Building this interface on SQL teaches where indexing, conditional writes and expiration rules belong. - Module 5 · Database scaling: read replicas, sharding and partitioning
Design: a URL shortener for millions of users
Small lookup services become difficult when links must survive failures, traffic concentrates on one key, and cached answers outlive changes. This design connects database scaling techniques into one working system. - Module 7 · Caching and CDNs
Design: a fast product catalog page
A popular product page must stay useful during traffic spikes without exposing another customer’s data or treating cached stock as a purchase guarantee. This design connects cache performance to those correctness boundaries. - Module 8 · Storage engines and on-disk data structures
Design: an S3-style object store
Upload services must coordinate large byte transfers with small, atomic metadata changes. This design shows where data becomes visible, what an acknowledgement promises, and how failures affect those promises. - Module 10 · Consensus, coordination and distributed transactions
Design: a concert ticket booking system
Booking systems combine scarce inventory with slow, uncertain payments. The same problems appear in travel reservations, appointments and limited-stock checkout. - Module 11 · Queues, background jobs and event streams
Design: a notification service
Notifications cross several failure boundaries before reaching a person. You need to separate saved work, provider acceptance and delivery, then decide what to retry at each boundary. - Module 11 · Queues, background jobs and event streams
Design: a durable event log like Kafka
Event infrastructure becomes part of your data system. Its acknowledgement rules, recovery behavior and retention policy determine whether downstream services can trust and rebuild their state. - Module 12 · Reliability, overload and traffic spikes
Design: an API rate limiter
A limiter sits before useful work, but can become a new source of outages. You need to control both the traffic it admits and the failures it introduces. - Module 13 · Observability, incidents and safe deployments
Design: monitoring and SLOs for a service
A service can look healthy while customers cannot use it. Engineers need monitoring that detects customer impact, identifies missing evidence and leads to a useful recovery action. - Module 13 · Observability, incidents and safe deployments
Design: migrating a production database
Moving a database changes where applications find their durable state. A safe migration must account for concurrent writes, stale connections, retries and the moment rollback stops being a routing change. - Module 15 · Search: indexing, ranking and retrieval
Design: search autocomplete
Autocomplete runs before a customer finishes expressing their intent. Its design must control work per keystroke, serve useful suggestions and avoid exposing unsafe query text. - Module 15 · Search: indexing, ranking and retrieval
Design: spelling correction (“Did you mean?”)
Search must recover from typing errors without replacing unfamiliar words with popular but unrelated ones. This design connects string algorithms, ranking, API behavior and safe index deployment. - Module 15 · Search: indexing, ranking and retrieval
Design: related and recent searches
Search suggestions combine private account state with shared behavioral data. Building them well requires careful boundaries around retries, ranking, deletion and background computation. - Module 16 · Analytics and counting at scale
Design: an ad click aggregator
Product analytics often become evidence for business decisions. You need to explain not only how quickly a count updates, but also what it counts, how it survives failures, and how it can be corrected. - Module 17 · Realtime systems, chat and social feeds
Design: live reactions on a video stream
Live interfaces often need a fresh impression of activity, not a permanent record of every action. That difference changes the data model, retry policy and amount of work each phone must do. - Module 17 · Realtime systems, chat and social feeds
Design: unread message indicators
Unread indicators combine user intent, ordered messages and delayed network requests. The same design problems appear in inboxes, support tools and notification centres. - Module 17 · Realtime systems, chat and social feeds
Design: live sports commentary
Live commentary combines a small write stream with a large broadcast audience. The same design problems appear in incident updates, election coverage and live announcements. - Module 17 · Realtime systems, chat and social feeds
Design: tagging people in photos
A photo tag connects somebody’s identity to another person’s content. Building it safely requires more than storing a name: consent, access checks, retries and delayed notifications must agree. - Module 17 · Realtime systems, chat and social feeds
Design: a chat app like WhatsApp
Chat exposes failures that ordinary request-response APIs can hide. A connection can disappear after a message commits, and several devices must still agree about what happened. - Module 17 · Realtime systems, chat and social feeds
Design: a social media news feed
Feeds combine cheap reads with expensive distribution. You need to control that distribution without making a cache responsible for permissions, deletion or durable storage. - Module 18 · Location, maps and matching systems
Design: a nearby restaurants service
Nearby search combines location, changing business rules and pagination. A fast distance query is not enough if customers see closed restaurants, missing choices or repeated results. - Module 18 · Location, maps and matching systems
Design: ride matching like Uber
Matching systems turn changing recommendations into exclusive commitments. The same problem appears in courier dispatch, job allocation and inventory reservations. - Module 19 · Media uploads, streaming and file sync
Design: a video platform like YouTube
Video platforms combine large transfers, expensive background work and latency-sensitive playback. The difficult boundary is deciding when uploaded bytes become safe, complete, playable content. - Module 19 · Media uploads, streaming and file sync
Design: a file sync service like Dropbox
Sync connects a transactional server to devices that disappear, retry and change files independently. The same problems appear in offline apps, document tools and deployment agents. - Module 20 · End-to-end design problems
Design: a photo-sharing app like Instagram
Photo features combine large files, small database records and expensive distribution. The same boundaries appear in product galleries, social feeds and customer-uploaded content. - Module 20 · End-to-end design problems
Design: a payment processing system
Payment systems connect your database to financial systems you cannot commit atomically. You need explicit identities, durable recovery and accounting records to keep uncertainty from becoming duplicate charges or missing money. - Module 20 · End-to-end design problems
Design: collaborative editing like Google Docs
Shared editors combine immediate local feedback with concurrent writes and unreliable connections. The same problems appear in shared forms, planning tools and collaborative product dashboards. - Module 20 · End-to-end design problems
Design: a recommendation engine
Recommendation quality depends on more than a model. Engineers must connect customer behavior, product availability, request deadlines and trustworthy evaluation. - Module 20 · End-to-end design problems
Design: in-app search for a large product
Search joins product data, relevance and distributed systems in one user request. You need to control what becomes searchable, how quickly changes appear and what happens when the index disagrees with the product database. - Module 20 · End-to-end design problems
Design: a web crawler
Importers, search systems and website monitors fetch data from services they do not control. Their hardest problems include safe destinations, bounded discovery and recovery after uncertain network outcomes. - Module 20 · End-to-end design problems
Design: an e-commerce checkout
Checkout joins several independently stored facts into one customer promise. You need a design that can explain and recover a purchase even when inventory, payments or the customer’s network fails. - Module 20 · End-to-end design problems
Design: a distributed key-value store
A distributed store must preserve its promises when clients retry, machines fail and ownership changes. These same problems appear inside databases, caches and stateful services. - Module 20 · End-to-end design problems
Design: a real-time game leaderboard
Leaderboards combine frequent writes, expensive ranking queries and visible fairness rules. The same design questions appear in sales rankings, competitions and activity tables.
Key numbers 6
A few µs
Context switch between threads
Thousands of threads switching all the time waste real CPU.
~1 MB
Stack reserved per Java platform thread
1,000 threads reserve about 1 GB for stacks alone.
~2 KB
Starting stack of a Go goroutine
Why one Go server can run hundreds of thousands of them.
100
PostgreSQL’s default connection limit
Often the real ceiling behind a large thread pool.
~0.5 ms
Round trip inside one data centre
Even “fast” network calls are waiting time.
1–10 ms
Simple indexed database query
Most of a typical request is waiting like this.