System Design Interview Prep interview questions

25 questions from the System Design Interview Prep course, each with the correct answer and an explanation. Try to answer before you open the answer.

The Interview Framework

1. What do interviewers mainly assess in system design rounds?

  1. Typing speed
  2. Recall of one correct architecture
  3. Structured reasoning about requirements and trade-offs
  4. Knowledge of a specific vendor's product names
Show answer

Answer: Structured reasoning about requirements and trade-offs

There is no single right answer.

Lesson: What Interviewers Look For

2. What should come before drawing components?

  1. Clarifying requirements and scope
  2. Choosing a database vendor
  3. Writing code
  4. Designing the monitoring dashboard
Show answer

Answer: Clarifying requirements and scope

Scope first.

Lesson: A Four-Step Framework

3. Which is a non-functional requirement?

  1. Links can expire
  2. Users can create short links
  3. Users can set a custom alias
  4. Redirects must have p99 latency under 50 ms
Show answer

Answer: Redirects must have p99 latency under 50 ms

Qualities, not features.

Lesson: Functional and Non-Functional Requirements

Back-of-Envelope Estimation

4. Roughly how many seconds are in a day for quick estimates?

  1. About 1,000
  2. About 100,000 (86,400)
  3. About 10 million
  4. About 3,600
Show answer

Answer: About 100,000 (86,400)

86,400 rounds to 10^5.

Lesson: Traffic and Storage Estimates

5. Which is slowest?

  1. A main memory reference
  2. A round trip between continents
  3. An SSD random read
  4. A round trip within a data centre
Show answer

Answer: A round trip between continents

Physics limits cross-continent latency.

Lesson: Latency Numbers and Their Implications

6. What happens to availability when components are chained in series?

  1. It becomes 100%
  2. It increases
  3. It stays equal to the best component
  4. It decreases, because availabilities multiply
Show answer

Answer: It decreases, because availabilities multiply

Each extra dependency is another way to fail.

Lesson: Availability Maths

Core Building Blocks

7. Why keep application servers stateless?

  1. So any server can handle any request and servers can be added or removed freely
  2. To make the code shorter
  3. Because databases require it
  4. To avoid needing a load balancer
Show answer

Answer: So any server can handle any request and servers can be added or removed freely

Statelessness enables horizontal scaling.

Lesson: Load Balancers and Stateless Services

8. Roughly what fraction of keys moves when going from 4 to 5 servers with consistent hashing?

  1. All of them
  2. About 80%
  3. About 20%
  4. None
Show answer

Answer: About 20%

Only the new server's share moves.

Lesson: Consistent Hashing

9. In cache-aside, what happens on a cache miss?

  1. The cache queries the database by itself and blocks writes
  2. The request fails
  3. The app reads from the database and stores the result in the cache
  4. The database is bypassed
Show answer

Answer: The app reads from the database and stores the result in the cache

The application manages the cache.

Lesson: Caching Strategies

Data Storage at Scale

10. Which store best fits money transfers between accounts?

  1. A relational database with ACID transactions
  2. A cache without persistence
  3. A search index
  4. A CDN
Show answer

Answer: A relational database with ACID transactions

Correctness needs transactions.

Lesson: SQL or NoSQL

11. What is a risk of sharding by creation date?

  1. It forbids indexes
  2. Data cannot be queried
  3. It makes data perfectly even
  4. New writes all hit the newest shard, creating a hot spot
Show answer

Answer: New writes all hit the newest shard, creating a hot spot

Range keys can skew load.

Lesson: Sharding and Shard Keys

12. With N=3 replicas, which setting guarantees reads overlap the latest write?

  1. W=1, R=1
  2. W=2, R=2
  3. W=1, R=2
  4. W=2, R=1
Show answer

Answer: W=2, R=2

R + W must exceed N.

Lesson: Replication and Consistency

13. What advantage do Snowflake IDs have over random UUIDv4s?

  1. They never need a machine ID
  2. They are roughly sortable by creation time
  3. They are 256 bits long
  4. They require a central counter
Show answer

Answer: They are roughly sortable by creation time

Time-ordered IDs help indexes and sorting.

Lesson: Generating Unique IDs

Asynchrony and Reliability

14. Why add jitter to retry backoff?

  1. To reduce message size
  2. To make retries faster
  3. To guarantee exactly-once delivery
  4. To stop many clients retrying at the same moment
Show answer

Answer: To stop many clients retrying at the same moment

Spread retries out in time.

Lesson: Message Queues and Worker Sizing

15. What should a server do when it receives a repeated idempotency key?

  1. Return the stored result without repeating the side effect
  2. Charge again
  3. Return an error and lose the result
  4. Ignore the key and process normally
Show answer

Answer: Return the stored result without repeating the side effect

Same effect as once.

Lesson: Idempotency

16. Which HTTP status signals rate limiting?

  1. 500 Internal Server Error
  2. 404 Not Found
  3. 429 Too Many Requests
  4. 301 Moved Permanently
Show answer

Answer: 429 Too Many Requests

With Retry-After when possible.

Lesson: Rate Limiting

Case Studies: Shortener, Feed, Crawler

17. Why prefer 302 over 301 in some shorteners?

  1. 301 is not supported by browsers
  2. 302 is faster
  3. Browsers do not cache 302 permanently, so every click reaches the service for analytics
  4. 302 needs no server
Show answer

Answer: Browsers do not cache 302 permanently, so every click reaches the service for analytics

Caching versus counting.

Lesson: Design a URL Shortener

18. Why do large feeds use a hybrid fan-out?

  1. Pushing celebrity posts to millions of feeds is too expensive
  2. Pull is always faster
  3. Push cannot handle small accounts
  4. Feeds cannot be cached
Show answer

Answer: Pushing celebrity posts to millions of feeds is too expensive

Different strategies for different accounts.

Lesson: Design a News Feed

19. What error can a Bloom filter make?

  1. Returning the wrong item
  2. Reporting an added item as absent
  3. Losing all items on restart only
  4. Reporting an item as present when it is not (false positive)
Show answer

Answer: Reporting an item as present when it is not (false positive)

No false negatives.

Lesson: Design a Web Crawler

Case Studies: Proximity, Chat, Notifications

20. Why query neighbouring geohash cells too?

  1. Geohash is inaccurate
  2. Nearby points just across a cell boundary have different prefixes
  3. To make results random
  4. Because cells overlap
Show answer

Answer: Nearby points just across a cell boundary have different prefixes

Edges split close points.

Lesson: Design a Proximity Service

21. Why do chat systems usually use WebSockets?

  1. They compress images
  2. They keep a persistent two-way connection so servers can push messages instantly
  3. They replace databases
  4. They avoid needing servers
Show answer

Answer: They keep a persistent two-way connection so servers can push messages instantly

Server push without polling.

Lesson: Design a Chat System

22. Why use separate queues per channel?

  1. To guarantee exactly-once delivery
  2. To use less memory
  3. Because providers require it
  4. So a slow or failing channel does not block others
Show answer

Answer: So a slow or failing channel does not block others

Isolation between channels.

Lesson: Design a Notification System

Delivering a Strong Interview

23. What makes a design decision well justified in an interview?

  1. Linking it to a requirement and naming the alternative's trade-off
  2. Using the newest technology
  3. Saying it is industry standard without detail
  4. Avoiding any mention of downsides
Show answer

Answer: Linking it to a requirement and naming the alternative's trade-off

Requirements drive trade-offs.

Lesson: Trade-offs and Bottlenecks

24. What should you do when the interviewer asks "what if this component fails?"

  1. Change the subject
  2. Say it will not fail
  3. Treat it as a hint and discuss failure handling for that component
  4. Start over with a new design
Show answer

Answer: Treat it as a hint and discuss failure handling for that component

Hints point to what they want to assess.

Lesson: Communication and Time Management

25. Which practice habit is most effective?

  1. Reading designs without practising
  2. Memorising one diagram per problem
  3. Timed, out-loud mock interviews followed by gap review
  4. Only studying vendor documentation
Show answer

Answer: Timed, out-loud mock interviews followed by gap review

Practise the conversation, not just the content.

Lesson: A Practice Plan and Checklist

← Back to the course