System design interview: a 6-step framework with a worked example

A system design interview asks you to design a large service on a whiteboard in about 45 minutes and defend your choices. This guide gives a repeatable 6-step framework, a full worked example, the building blocks you need and a 4-week plan.

What is a systems design interview?

A systems design interview, usually written system design interview, is a round where you design a large software service from a vague prompt, such as a URL shortener or a chat app. You clarify requirements, estimate scale, sketch the parts and defend your trade-offs in a conversation. It is common for mid-level and senior engineering roles. Juniors may get a lighter version.

What does a system design interview test?

It tests whether you can take a vague request ("design a URL shortener") and turn it into a workable plan. Interviewers usually listen for:

  • Scoping. Do you ask what the system must do and what it can skip?
  • Structure. Do you move through the problem in a clear order?
  • Trade-offs. Can you say why you chose one option and what it costs?
  • Depth. When asked to zoom in, can you go one level deeper?
  • Communication. Can the interviewer follow your thinking?

The exact format differs by company and level. Your CV or resume often decides which systems they ask about, so know every project on it. Check any official prep material your recruiter sends, and ask what the round will cover.

What is a repeatable framework for a system design interview?

Use six steps in order. Write the step names on the board so you and the interviewer can see where you are.

  1. Requirements. Functional (what it does) and non-functional (scale, latency, availability, consistency). Ask who uses it and how many.
  2. Estimates. Requests per second, storage, bandwidth. Round hard. State every number as an assumption.
  3. API. A few endpoints with inputs and outputs. This fixes the scope.
  4. Data model. The main entities, the keys and which database type fits the access pattern.
  5. Architecture. Boxes and arrows: clients, load balancer, services, cache, database, queue. Walk one request through the whole path.
  6. Trade-offs and scaling. Find the bottleneck, name two options for fixing it and pick one. Cover failures too.

Time guide for 45 minutes (our rule of thumb): 5 on requirements and estimates, 5 on API and data, 15 on architecture, 15 on trade-offs and scaling, 5 for questions.

Worked example: design a URL shortener

Step 1: requirements

Functional: create a short link from a long URL, and redirect from the short link to the long one. Optional: custom aliases, expiry, click counts. Non-functional: redirects must be fast, links should not break, and the service should stay up if one machine fails. Ask the interviewer to confirm. Here we assume no analytics in version one.

Step 2: estimates (all assumptions)

  • 100 million new links a month.
  • One month is about 2.6 million seconds, so about 40 writes a second on average.
  • Assume 100 reads for every write, so about 4,000 redirects a second on average. Assume peak is 2 to 3 times that, around 10,000.
  • Keep links for 5 years: 100 million x 12 x 5 = 6 billion records.
  • Assume 500 bytes a record (short code, long URL, dates): about 3 TB in total.
  • A 7-character code from 62 characters (a to z, A to Z, 0 to 9) gives 62^7, about 3.5 trillion codes. That is far more than 6 billion, so 7 characters is enough.

What this tells you: 40 writes a second is small. The load is read-heavy, 3 TB fits a sharded or distributed store, and caching will help a lot.

Step 3: API

  • POST /links with a long URL and an optional alias. Returns the short URL.
  • GET /{code} returns an HTTP redirect (301 or 302) to the long URL.

Trade-off to mention: a 301 can be cached by browsers, which cuts load but hides later clicks and blocks changing the target. A 302 hits your server each time.

Step 4: data model

One table: code (key), long_url, created_at, expires_at, owner_id. The only hot query is "get by code", so a key-value store or a relational table with an index on code both work. Say which you pick and why.

Step 5: architecture

Client, then load balancer, then stateless app servers, then a cache, then the database. A redirect: the app server checks the cache by code, falls back to the database on a miss, fills the cache and returns the redirect. Creating a link: the app server makes a code, writes it to the database and returns it.

Making the code is the interesting part. Two common options:

  • Counter plus base62. A global counter gives unique numbers, and you encode each one in base62. No collisions, but the counter needs care at scale (for example, each server takes a block of numbers).
  • Random or hashed code. Simple to spread out, but you must check for collisions and retry.

Step 6: trade-offs and scaling

  • Cache. Redirects repeat for popular links. If the hot set is about 20% of one day's reads (assumption), a cache of tens of GB holds most of it.
  • Sharding. Split the table by hash of the code once one database is too big or too busy.
  • Replication. Add read replicas, and accept that a new link may take a moment to appear everywhere.
  • Failure. If the cache dies, the database must survive the extra load. Mention gradual cache warm-up.
  • Abuse. Rate limit link creation and check for harmful targets.

What building blocks should you know?

BlockWhat it doesCost to mention
Load balancerSpreads requests over serversNeeds its own redundancy
CacheKeeps hot data in memory for fast readsStale data and invalidation
CDNServes static files from servers near the userCache purge delays
Message queueLets one part hand work to another laterDelay, duplicates, ordering
ReplicationCopies data to more machines for reads and safetyReplicas can lag
ShardingSplits data across machines by a keyHot shards, harder joins
SQL or NoSQLSQL for relations and transactions; many NoSQL stores for simple lookups at scaleFewer guarantees or flexibility

For each one, learn the problem it solves, not just the name. "I add a queue because sending email should not slow the request" beats "I add Kafka".

What are typical system design interview questions?

These are typical prompts to prepare for, not reports of what any company asked. Pick three or four and run the six steps on each.

  1. Design a URL shortener.
  2. Design a rate limiter.
  3. Design a news feed or timeline.
  4. Design a chat or messaging app.
  5. Design a file storage and sync service.
  6. Design a video streaming service.
  7. Design a notification system.
  8. Design a search autocomplete feature.
  9. Design a web crawler.
  10. Design a ride-sharing service.
  11. Design a key-value store.
  12. Design a ticket booking system.
  13. Design a distributed job scheduler.
  14. Design a metrics and logging system.
  15. Design an online document editor.

The same few ideas recur: caching, queues, sharding and fan-out. Learn those and most prompts feel familiar. A fair order to practice: URL shortener and rate limiter first, then news feed and chat, then the larger ones such as video streaming or ride sharing.

System design interview: Amazon

For an Amazon system design interview, use the same six steps and the same building blocks. Amazon says candidates meet individually with current employees in an "interview loop", and each person assesses different aspects of your skills (Amazon interview page, checked November 2026); its page does not describe a system design round. Format and level expectations vary by team, so ask your recruiter what the round covers, and read any official prep material they send. Prepare the behavioral side separately: see Amazon interview questions.

How do you handle a system design interview?

Ask questions first, state your assumptions and write the six steps on the board. Keep a rough clock. Draw a simple design that works before you improve it, name the bottleneck yourself, and give two options with a pick. When the interviewer changes a requirement, say what changes and adjust. Talking through your reasoning is the work.

Is a system design interview hard?

Many people find it hard because there is no single right answer and the prompt is open. It gets easier with a fixed order, a short list of building blocks and practice out loud. The same few ideas recur: caching, queues, replication and sharding. Most of the difficulty comes from unfamiliarity, and three or four timed practice sessions close much of that gap.

What mistakes cost people the round?

  • Drawing before asking. Spend the first minutes on requirements.
  • Buzzwords without reasons. Every box on the board needs a why.
  • Skipping the numbers. Without estimates you cannot justify sharding or a cache.
  • Going silent. Think out loud. The interviewer cannot grade thinking they cannot hear.
  • Ignoring failure. Say what happens when a server, a disk or a network link dies.
  • Over-engineering. Start simple, then add parts when a number demands it.
  • Not listening to hints. A question like "what if reads grow 10 times?" is a nudge toward the bottleneck.

How can I prepare for a system design interview? A 4-week plan

If you are wondering how to prepare for a system design interview with limited time, this plan works for about 5 hours a week. It is our suggestion, not an official one.

  • Week 1: basics. Learn the table above. Practice the estimate math (seconds in a day, powers of two) until it is fast.
  • Week 2: data and storage. Replication, sharding, indexes, SQL against NoSQL, consistency choices. Redo the URL shortener from a blank page.
  • Week 3: classic prompts. Do four from the list: rate limiter, news feed, chat, notifications. Time yourself for 45 minutes and speak aloud.
  • Week 4: mocks. Do at least two mock sessions with a friend or colleague who asks follow-ups. Write down every place you got stuck and fix those.

For the coding rounds that often sit beside this one, see LeetCode patterns, live coding interview tips and technical interview tips.

A live option if you freeze mid-answer

Practice beats any tool, and your employer or the company's interview rules come first. Check them before you use any assistant in a real round. If those rules allow it, Hintly is a desktop app for Mac and Windows that listens to a call and shows answers from your own notes in an overlay that is left out of screen shares. It is pre-launch, so the action today is the waitlist. It suits coding and design rounds where your own notes hold the checklists. See the AI coding interview assistant page or the interview hub.

Questions

How long does a system design interview last?

Many loops give it a 45 to 60 minute slot, but the length varies by company. Ask your recruiter. Plan to spend the first few minutes on requirements so you leave enough time for the design and the trade-offs.

Is there one right answer?

No. Interviewers compare how you reason: which requirements you pin down, which trade-offs you name and how you react when they change a constraint. Two different designs can both pass.

Do I need to know every technology?

No. You need the basic building blocks (cache, queue, CDN, replication, sharding, load balancer) and when each one helps. Naming a product matters less than explaining why you need that kind of component.

Should I do the math on estimates?

Yes, but keep it rough. Round numbers, say them out loud and state them as assumptions. The point is to learn whether the system needs one database or many, not to be exact.

How is this different from a coding round?

A coding round has a checkable answer. A design round is a conversation with no single answer, so talking through your reasoning is the work. For the coding side, see the live coding tips linked below.

Your next interview, handled.

Hintly is almost ready. Leave your email and we’ll tell you the day you can download it.

Mac and Windows · No spam