Skip to content

20 interview questions

System design interview questions and answers

A system design interview gives you a vague product and around 45 minutes to turn it into a working architecture. There is no single right answer; the interviewer watches how you clarify requirements, estimate scale, choose components and explain trade-offs. Use the same structure every time and spend most of the time where the problem is actually hard.

Updated

Approach and fundamentals

01How do you structure a system design interview?

What they want to hear: Whether you have a method that keeps you from jumping into boxes and arrows before you know what to build.

Answer outline

  1. Requirements: functional (what users do) and non-functional (scale, latency, availability, consistency).
  2. Estimates: users, requests per second, read to write ratio, storage per year.
  3. API and data model, then a simple high-level design that works.
  4. Deep dive into the hardest parts, then bottlenecks, failure modes and trade-offs.

02How would you estimate the scale of a system?

What they want to hear: Comfort with rough numbers and using them to drive design decisions.

Answer outline

  1. Start from daily active users and actions per user per day.
  2. Divide by roughly 100,000 seconds in a day to get average requests per second, then multiply for peaks.
  3. Storage: records per day times size per record times retention period.
  4. Use the numbers to decide: does it fit on one machine, does it need caching, sharding or a CDN?

03How do you scale a database that has become the bottleneck?

What they want to hear: Knowing the order of options and the cost of each.

Answer outline

  1. First optimise queries and indexes, and add caching for hot reads.
  2. Add read replicas for read-heavy load, accepting some replication lag.
  3. Partition data by a key (sharding) when writes or size outgrow one machine; choose the key to avoid hot spots.
  4. Mention the costs: cross-shard queries, rebalancing and harder transactions.

04What is consistent hashing and why is it useful?

What they want to hear: A building block for distributed caches and storage, and whether you understand the problem it solves.

Answer outline

  1. With hash(key) mod N, changing N moves almost every key.
  2. Consistent hashing places nodes and keys on a ring; each key goes to the next node clockwise.
  3. Adding or removing a node moves only the keys near it.
  4. Virtual nodes spread load more evenly across machines.

05Strong or eventual consistency: how do you decide?

What they want to hear: Matching guarantees to the product instead of defaulting to one.

Answer outline

  1. Strong consistency: every read sees the latest write; needed for balances, inventory, bookings.
  2. Eventual consistency: replicas converge over time; fine for likes, view counts, feeds.
  3. Stronger guarantees usually cost latency and availability during failures.
  4. Mixed designs are common: strong for the critical path, eventual for the rest.

Classic design problems

06Design a URL shortener.

What they want to hear: A small problem where they judge structure, key generation and handling of a very read-heavy load.

Answer outline

  1. Requirements: shorten a URL, redirect quickly, optional custom alias and expiry; reads far outnumber writes.
  2. API: POST /links returns a short code; GET /{code} returns a 301 or 302 redirect (302 if you need click analytics).
  3. Keys: base62 encode a unique id from a counter or id generator, or random 7 characters with a uniqueness check.
  4. Data: code to long URL in a key-value store; cache hot codes and serve redirects close to users.
  5. Trade-offs: predictable counter ids versus random keys, analytics written asynchronously, abuse and malware checks.

07Design a rate limiter.

What they want to hear: Algorithm choice and making it work across many servers.

Answer outline

  1. Requirements: limit by user, API key or IP; return 429 with a Retry-After header; low added latency.
  2. Algorithms: token bucket (allows bursts), fixed window (simple, spikes at boundaries), sliding window log or counter (more accurate).
  3. For many servers, keep counters in a shared fast store such as Redis, using atomic increments or a script.
  4. Decide where it runs: API gateway or middleware, and whether to fail open or closed if the store is down.

08Design a chat application like a messaging app.

What they want to hear: Real-time delivery, ordering and offline handling.

Answer outline

  1. Requirements: one-to-one and group chats, online status, delivery and read receipts, history across devices.
  2. Connections: persistent WebSocket connections to chat servers, with a service that knows which server holds each user.
  3. Flow: store the message first, then push to online recipients and send push notifications to offline ones.
  4. Data: messages partitioned by conversation id and ordered by a per-conversation sequence number.
  5. Trade-offs: fan-out for large groups, message ordering, end-to-end encryption limits on server features.

09Design a news feed.

What they want to hear: The fan-out trade-off and how you handle users with huge followings.

Answer outline

  1. Requirements: users post, follow others and see a feed of recent posts quickly.
  2. Fan-out on write: push each new post id into followers' precomputed feeds; fast reads, expensive for accounts with millions of followers.
  3. Fan-out on read: build the feed at request time from followed accounts; cheap writes, slower reads.
  4. Hybrid: push for most users, pull for very large accounts and merge at read time.
  5. Store feed ids in a cache, hydrate posts separately, paginate with a cursor, and rank as a separate step.

10Design a notification system.

What they want to hear: Reliable asynchronous delivery across channels, with user preferences and retries.

Answer outline

  1. Requirements: email, SMS and push; user preferences; templates; scheduling; no duplicates.
  2. Services publish events to a queue; a notification service applies preferences and renders templates.
  3. Per-channel workers call providers, with retries, backoff and a dead-letter queue.
  4. Use idempotency keys to avoid sending twice, rate limit per user, and track delivery status.

11Design a file storage and sharing service.

What they want to hear: Handling large binary data, metadata and sync.

Answer outline

  1. Requirements: upload, download, share links, sync across devices, version history.
  2. Split files into chunks, store chunks in object storage keyed by content hash, which also gives deduplication.
  3. Keep metadata (files, folders, versions, permissions) in a relational database.
  4. Use direct uploads to storage with signed URLs, and notify other devices of changes.

12Design a web crawler.

What they want to hear: Distributed work scheduling, politeness and duplicate detection.

Answer outline

  1. Requirements: pages per day, freshness, respect for robots.txt.
  2. A URL frontier queue, partitioned by host so each host gets limited requests per second.
  3. Workers fetch, parse, store content and extract links back into the frontier.
  4. Deduplicate URLs with a seen set or Bloom filter, and near-duplicate content with hashing.

13Design a typeahead or autocomplete service.

What they want to hear: Very low latency reads and precomputation.

Answer outline

  1. Requirements: suggestions within tens of milliseconds as the user types, ranked by popularity.
  2. Precompute top suggestions per prefix from query logs in a batch job.
  3. Serve from a trie or a prefix to suggestions map held in memory or a cache.
  4. Client debounces keystrokes and caches results; update rankings periodically, not on every query.

14Design a ride-sharing dispatch system.

What they want to hear: Location data at scale and matching under time pressure.

Answer outline

  1. Requirements: drivers send locations every few seconds, riders request a ride and get matched quickly.
  2. Store live driver locations in memory, indexed by a geospatial grid such as geohash cells.
  3. Matching searches nearby cells for available drivers and offers the trip to one at a time with a timeout.
  4. Trip state lives in a durable database; location updates are high volume and can be lossy.

Components and building blocks

15Where would you put caches in a system, and what can go wrong?

What they want to hear: Knowing the layers and the classic failure modes.

Answer outline

  1. Layers: browser, CDN, application cache such as Redis, database buffer cache.
  2. Patterns: cache-aside, write-through, write-behind.
  3. Problems: stale data, cache stampede on a hot key expiry, cold cache after restart.
  4. Mitigations: TTL with jitter, request coalescing, warming important keys.

16When would you introduce a message queue or event stream?

What they want to hear: Whether asynchronous design solves a real problem in your design.

Answer outline

  1. To decouple services, absorb spikes and move slow work out of the request path.
  2. Queues suit tasks processed once; logs such as Kafka-style streams suit events read by many consumers and replayed.
  3. Expect at-least-once delivery, so make consumers idempotent.
  4. Mention ordering per partition key and monitoring consumer lag.

17How do you design for high availability?

What they want to hear: Thinking about failure as normal and removing single points of failure.

Answer outline

  1. Run multiple instances behind load balancers with health checks.
  2. Replicate data across availability zones, with automatic failover.
  3. Use timeouts, retries with backoff and circuit breakers between services.
  4. Define the availability target and test failure with drills.

18How do you generate unique ids in a distributed system?

What they want to hear: A detail that affects ordering, sharding and collisions.

Answer outline

  1. UUIDs: no coordination, but large and random, which hurts index locality (time-ordered variants help).
  2. Database sequences: simple, but a central bottleneck.
  3. Snowflake-style ids: timestamp plus machine id plus sequence, roughly time ordered and unique without coordination.
  4. Pick based on whether you need ordering, size limits and how many writers exist.

Communicating your design

19The interviewer says your design will not handle ten times the traffic. What do you do?

What they want to hear: Whether you take pushback as data and adapt calmly.

Answer outline

  1. Ask which part they expect to break, or find the bottleneck with your estimates.
  2. Propose a concrete change for that part: caching, sharding, async processing.
  3. State the new trade-off the change introduces.

20Tell me about a system you designed or significantly changed at work.

What they want to hear: Real design experience and ownership of decisions, not just textbook knowledge.

Answer outline (STAR)

  1. The problem, the scale and the constraints.
  2. The design you chose and the alternatives you rejected, with reasons.
  3. What happened in production, including what did not go as planned.
  4. What you would change now.

How to prepare

  • Use the same structure every time: requirements, estimates, API, data model, high-level design, deep dive, trade-offs.
  • Say the trade-off out loud for every major choice. 'I chose X, which gives us A but costs B' is what interviewers write down.
  • Practise drawing a clear diagram quickly, with labelled arrows that show the direction of data.
  • Do not over-engineer the first version. Start simple, then scale the parts the numbers say will break.
  • Practise a few classic problems end to end against a timer so you learn to manage the 45 minutes.

Practice these questions out loud with NORDON

Reading answers is not the same as saying them. NORDON's interview practice asks you questions written for the role, listens to your spoken answer and shows you how to make it stronger.

  1. Upload your CV in the Knowledge base, so questions and feedback use your real background.
  2. Open Practice, enter the role (for example system design), paste the job ad if you have it, and choose 3, 5, 8 or 10 questions and the answer language.
  3. Listen to each question and answer out loud, as you would in the room. You can also type an answer.
  4. Get a score from 1 to 10, what worked, what to improve and a stronger answer to rehearse. It uses only what you said and your documents, and leaves a [placeholder] where a fact about you is missing.
  5. Try the question again, or move on. For a dress rehearsal, run a mock call where an interviewer voice asks the questions out loud.

The free plan includes 10 scored practice answers a month and mock calls of up to 10 minutes, no card needed. Paid plans include more practice and mock calls of up to 30 minutes. How practice works

Practice is for preparing. Use live help in a real interview only where the interviewer allows AI assistance, never in an interview, test or assessment whose rules forbid it.

NORDON for job interviews

Preparing for your system design interview

Who gets a system design interview?

Usually mid-level and senior engineers, and sometimes juniors in a lighter form. The more senior the role, the more the interviewer expects you to drive the discussion and go deep on trade-offs.

Is there a right answer in a system design interview?

No. Several designs can be good. Interviewers judge how you clarify the problem, whether your design meets the requirements you agreed, and how well you explain the trade-offs.

How should I prepare in the weeks before?

Learn the building blocks (load balancers, caches, queues, databases, replication, sharding), then practise full problems out loud, ideally with someone playing the interviewer. Review designs afterwards for missing requirements and unexplained choices.