Career Skills · Software Professionals

System Design Interview

A structured path for designing scalable systems and explaining tradeoffs clearly in technical interviews.

System DesignInterviewsArchitecture

Start with A Repeatable System Design Framework →

Course roadmap

Know where you are going before you begin

A useful course should make the starting point, destination, and learning method clear—not make you guess from a list of links.

Learning material

Inside this course

Move through the material in order unless a prerequisite or practice link gives you a better reason to branch.

Interview preparation

Course interview practice

Use these as compact whiteboard drills after the course. Clarify the requirement first, estimate only what changes the design, sketch the critical request and data paths, then explain bottlenecks, failure behavior, and the trade-off you chose.

01 · IntermediateYou are asked to design a messaging service. What should you clarify before choosing databases, queues, or caches?

Answer out loud before opening the expected response.

Practice

Expected answer
Clarify the users and core actions, one-to-one versus group messaging, delivery expectations, ordering, retention, attachment needs, online/offline behavior, expected scale, latency goals, and which failures the product must tolerate.

Why this answer works
A system design interview is not a guessing contest about the interviewer’s preferred stack. Requirements determine the architecture. The strongest opening turns vague product language into constraints that can influence data modeling, consistency, fan-out, storage, transport, and recovery choices before technologies enter the discussion.

Review the relevant lesson →

02 · SeniorFor a URL shortener, how would you reason about generating short identifiers without creating a central bottleneck?

Answer out loud before opening the expected response.

Practice

Expected answer
First define the collision and predictability requirements, then compare approaches such as database-generated ranges, distributed ID generation, or sufficiently large random identifiers with collision detection. Choose based on throughput, coordination cost, and operational simplicity.

Why this answer works
There is no universally correct ID algorithm. A single incrementing database sequence is simple but can concentrate coordination; random IDs distribute generation but require a collision strategy; preallocated ranges reduce coordination but add operational bookkeeping. State which property matters most, then justify the smallest design that satisfies it.

Review the relevant lesson →

03 · SeniorA read-heavy service becomes fast after adding a cache, but users sometimes see stale data after updates. How would you reason about the fix?

Answer out loud before opening the expected response.

Practice

Expected answer
Start by defining how stale the product is allowed to be and which writes require immediate visibility. Then choose an invalidation, update, TTL, or versioning strategy that meets that consistency requirement instead of treating cache eviction as an isolated performance tweak.

Why this answer works
Caching introduces a second copy of data, so it creates a consistency problem as well as solving a latency problem. A good answer names the source of truth, explains when cached entries become invalid, considers races and cache misses, and accepts bounded staleness only when the product requirement allows it.

Review the relevant lesson →

04 · SeniorA partitioned datastore is evenly sized overall, yet one partition receives most of the traffic. What should you investigate and change?

Answer out loud before opening the expected response.

Practice

Expected answer
Inspect the partition key and access distribution for hot tenants, timestamps, sequential IDs, celebrity-style records, or other skew. A fix may require a better key, bucketing or salting, request spreading, caching, or isolating unusually hot workloads.

Why this answer works
Partition count alone does not guarantee scalability. The partition function must distribute the actual workload, not just the stored bytes. Strong answers separate storage balance from request balance and explain the new costs introduced by techniques such as salting, including scatter-gather reads or more complex aggregation.

Review the relevant lesson →

05 · ArchitectA queue can occasionally deliver the same job more than once. How should the consumer be designed so retries do not corrupt business state?

Answer out loud before opening the expected response.

Practice

Expected answer
Assume duplicate delivery is possible and make the business operation idempotent, for example by using a stable operation key, conditional write, deduplication record, or state transition that can safely recognize an already-applied action.

Why this answer works
Retries improve reliability only when repeated execution is safe. “Exactly once” is often an end-to-end business property rather than a magic broker setting. A strong answer identifies the side effect being protected, defines the idempotency boundary, explains how concurrent duplicates are handled, and considers retention or cleanup of deduplication state.

Review the relevant lesson →

Continue to comprehensive Interview Prep →

Knowledge check

Test what you can apply

Five course-specific questions covering the most important ideas in System Design Interview. Commit to an answer before reading the explanation.

Score0 / 50 answered
01

An interviewer says, “Design a photo-sharing service.” What is the strongest first move?

02

A read endpoint is expected to receive 20,000 requests per second, while writes are about 100 per second. Why is that estimate useful before drawing the architecture?

03

A product team adds a cache to reduce database load. A user updates her profile but immediately sees the old value. Which design concern has appeared?

04

A URL shortener receives a request for /aB91x. On the critical redirect path, what must the system do efficiently?

05

Two candidate designs both meet the functional requirements. Design A is simpler but can lose a few minutes of analytics during a regional outage; Design B avoids that loss but doubles operational complexity and cost. What makes a strong interview answer?