On this page
System design interviews used to be reserved for senior engineers. Today many companies include a system design interview for junior and mid-level candidates too, though with a different bar. Nobody expects a new graduate to design a global payment network from memory. Interviewers want to see that you can turn a vague problem into requirements, sketch a sensible architecture, and reason about trade-offs out loud.
This guide gives you a four-step framework, the building blocks you should know, and a worked example you can practise with.
What interviewers evaluate at junior and mid level
- Structured thinking: do you clarify the problem before drawing boxes?
- Reasonable defaults: do you choose standard components for standard problems?
- Trade-off awareness: can you explain why you chose a cache, a queue or a particular database, and what it costs?
- Communication: do you check in with the interviewer and adapt when they push in a direction?
- Depth in at least one area: can you go deeper on the data model, an API, or a bottleneck when asked?
The four-step framework
Step 1: Clarify requirements
Spend the first few minutes asking questions. Separate functional requirements (what the system does) from non-functional requirements (scale, latency, availability, consistency). Useful questions:
- Who are the users and what are the core actions?
- Is the workload read-heavy or write-heavy?
- How many users or requests should we plan for?
- What latency is acceptable, and is stale data ever acceptable?
- What is out of scope?
Write the agreed requirements down where both of you can see them.
Step 2: Estimate the scale
Back-of-the-envelope estimates guide your design. Convert users into requests per second and storage per year. A day has 86,400 seconds, which you can round to about 100,000 for quick maths. For example, 10 million requests per day is roughly 100 to 120 requests per second on average; plan for peaks several times higher.
Estimate storage by multiplying records per day by record size and retention. These numbers tell you whether a single database will do, whether you need caching, and whether sharding is worth discussing.
Step 3: High-level design
Define the API first: a few endpoints with inputs and outputs. Then sketch the main components: clients, load balancer, application servers, cache, database, and any queues or background workers. Walk through one request end to end.
Step 4: Deep dives and trade-offs
The interviewer will usually pick an area to explore: the data model, a bottleneck, failure handling, or scaling. Discuss options, choose one, and explain what you give up.
Building blocks you should know
| Component | What it does | Trade-offs to mention |
|---|---|---|
| Load balancer | Spreads traffic across servers, removes unhealthy ones | Adds a hop; needs health checks; session stickiness complications |
| Cache (e.g. Redis) | Serves frequent reads from memory | Stale data, invalidation strategy, memory cost |
| Relational database | Structured data, joins, transactions | Harder to scale writes horizontally |
| NoSQL store | Simple access patterns at very high scale | Limited joins, often eventual consistency |
| Message queue | Decouples producers from slow consumers | Eventual processing, retries, ordering |
| CDN | Serves static content near users | Cache invalidation, cost for dynamic content |
| Object storage | Cheap, durable storage for files and media | Higher latency than local disk |
Caching
Know the common patterns. Cache-aside (the application reads the cache, falls back to the database and populates the cache) is the usual default. Write-through updates cache and database together. Discuss TTLs, eviction (LRU is the common default) and what happens on a cache miss storm when a popular key expires.
Rate limiting
A rate limiter protects a service from abuse and overload. Know two algorithms:
- Token bucket: tokens refill at a steady rate up to a maximum; each request spends one. It allows short bursts, which suits most APIs.
- Sliding window: counts requests in a moving time window for smoother limits than a fixed window.
In a distributed system, counters typically live in a shared store such as Redis so all servers enforce the same limit. Mention returning HTTP 429 with a Retry-After header.
Replication and sharding
Replication copies data to multiple nodes for availability and read scaling, with a trade-off between consistency and latency. Sharding splits data across nodes by a key, for example user ID. Discuss how to choose a shard key that spreads load evenly, the problem of hot keys, and why consistent hashing reduces data movement when nodes are added or removed.
Consistency and the CAP trade-off
When a network partition happens, a distributed system must choose between staying available and staying strictly consistent. Many systems choose availability with eventual consistency for non-critical data, and strong consistency for things like payments or inventory. Tie this to the requirements you clarified.
Worked example: a URL shortener
Requirements: create a short link for a long URL; redirect short links quickly; links do not expire by default; analytics are out of scope. Read-heavy: many more redirects than creations.
Estimates: suppose 1 million new links per day (about 12 writes per second) and 100 million redirects per day (about 1,200 reads per second on average, higher at peak). At around 500 bytes per record, that is roughly 500 MB of new data per day, or under 200 GB a year.
API: POST /links with the long URL returns a short code; GET /{code} returns an HTTP 301 or 302 redirect.
Design: application servers behind a load balancer; a key-value or relational store mapping code to URL; a Redis cache in front for popular codes. Generate codes by encoding a unique ID from a counter or ID service in base62, which avoids collisions; seven base62 characters give over three trillion combinations.
Deep dives: cache-aside for redirects, since links rarely change; 301 versus 302 depending on whether you need to count clicks; sharding by code if the table grows beyond one node; rate limiting link creation to prevent spam.
Common mistakes
- Drawing a design before agreeing on requirements.
- Adding microservices, Kafka and Kubernetes to a problem that does not need them.
- Ignoring failure: what happens when the cache or database goes down?
- Staying silent while thinking. Narrate your reasoning.
- Refusing to commit. It is fine to choose one option and note the alternative.
Practise and prepare
Practise by explaining the architecture of your own projects using this framework; it doubles as interview preparation for project questions. Pair it with behavioural preparation using our STAR method guide for software engineers, make sure your resume describes architecture decisions clearly with the ATS resume checker, and browse software engineering jobs to target your preparation at real roles.
FAQs
Do junior engineers get system design interviews?
Increasingly, yes, though the bar is different. Junior and new-graduate rounds usually focus on clear thinking, sensible APIs and data models, and awareness of basic trade-offs such as caching and database choice, rather than deep distributed systems expertise.
How should I prepare for system design as a fresher?
Learn the core building blocks (load balancers, caches, databases, queues), practise a structured approach on common problems, and relate each concept to something you have built. Explaining your own project's architecture well is excellent practice.
How long is a typical system design interview?
Usually 45 to 60 minutes. Plan roughly 5 to 10 minutes for requirements, a few for estimates, 15 to 20 for the high-level design, and the rest for deep dives and trade-offs.
Do I need to know exact numbers like QPS and latency?
You need reasonable orders of magnitude and the ability to do quick arithmetic, not precise figures. Interviewers care that your estimates are sensible and that they influence your design choices.
SQL or NoSQL: which should I pick in an interview?
Pick based on the access patterns and consistency needs you identified, and say why. A relational database is a safe default for structured data with relationships and transactions; key-value or wide-column stores suit simple lookups at very high scale.
Check your resume before you apply
Score your resume against any job description and see exactly which keywords are missing. Free.