System design interviews are open-ended on purpose: the interviewer wants to see how you structure an ambiguous problem. A repeatable six-step framework keeps you organised and makes sure you cover what they score — requirements, scale, interfaces, data, architecture and trade-offs.
The six steps
| Step | What you do | Time (45-min interview) |
|---|---|---|
| 1. Clarify | Functional and non-functional requirements | 5 min |
| 2. Estimate | Traffic, storage, read/write ratio | 5 min |
| 3. API | The few endpoints that matter | 5 min |
| 4. Data | Entities, storage choice, keys | 5 min |
| 5. High-level design | Boxes and arrows, end to end | 10 min |
| 6. Deep dive | Bottlenecks, scaling, failure, trade-offs | 15 min |
Worked example: design a URL shortener
1. Clarify
Shorten a long URL to a short code; redirect when the code is visited; optional custom codes and click analytics. Non-functional: very low redirect latency, high availability, codes must never collide.
2. Estimate
Assume 100 million redirects a day and a 100:1 read-to-write ratio — about 1 million new links a day. Roughly 1,200 redirects a second on average, several times that at peak. Five years of links ≈ 1.8 billion rows; at ~500 bytes each, under 1 TB.
3. API
POST /links{url, custom_code?}→{code}GET /{code}→301redirect to the long URL
4. Data
A key-value store mapping code → long URL (plus created_at, owner). Reads dominate, so it should be replicated. Seven base62 characters give 62⁷ ≈ 3.5 trillion codes — plenty.
5. High-level design
Client → load balancer → stateless app servers → cache (Redis) → key-value store. New codes come from base62-encoding a distributed counter (or pre-allocated ID ranges per server), so there are no collisions to retry. Clicks are written to a queue and processed asynchronously for analytics.
6. Deep dive and trade-offs
- Hot links: cache aggressively; put a CDN in front of the most popular redirects.
- 301 vs 302: 301 is cacheable by browsers (faster, but you lose some analytics); 302 keeps every hit on your servers.
- Custom codes: check uniqueness with a conditional write.
- Failure: replicate the store across zones; app servers are stateless, so scale them horizontally.
- Abuse: rate-limit link creation and scan for malicious URLs.
Tips that make the difference
- Think out loud and confirm assumptions before designing.
- Draw early — a simple diagram anchors the conversation.
- Name trade-offs explicitly; there is rarely one right answer.
- Manage time — leave at least 15 minutes for the deep dive.
Ansly answers system-design questions with a structured outline and a live diagram — watch it handle this exact question in the one-minute demo.
Frequently asked questions
How do I start a system design interview?
Clarify requirements and constraints first — what the system must do, how many users, and what matters most (latency, consistency, cost) — before drawing anything.
What are common system design interview questions?
URL shortener, rate limiter, chat app, news feed, file storage, notification service and ride-hailing dispatch are among the most common.
How should freshers prepare for system design?
Learn the building blocks (load balancers, caches, databases, queues), then practise the six-step framework on two or three classic questions out loud.