VDesign a URL shortener. Where are the bottlenecks?
Interviewer questionSystem design
There is no single right design. Interviewers evaluate how you clarify the problem, how you reason about numbers and how you explain trade-offs. Speaking in a clear order is more important than naming many technologies.
Use a fixed structure and say it aloud: requirements, rough numbers, a simple design, then the bottlenecks and how to scale. When you say "now I will estimate the load", the interviewer can follow you, and you gain a moment to think.
- ✓Words → phrases → sentences → speaking
- ✓Answer meaning
- ✓Language
Common questions and sample answers
Design a URL shortener. Where are the bottlenecks?
What the interviewer wants to hear. Clarifying questions first, then a simple design, then the real bottleneck: reads and unique codes.
Sample answer to practise aloudFirst I clarify the requirements: how many new links per day, how many redirects, and whether links expire. Let us say 100 million new links a month and a hundred times more reads. The design is simple: an API to create a link, a service that generates a unique short code, a database that maps the code to the URL, and a redirect service with a cache. Reads are the main load, so I put a cache in front of the database and use a store that scales for key-value access. The hard part is generating unique codes without collisions, for example with ranges of a counter given to each server, and base-62 encoding. I would also add rate limiting against abuse.
How do you structure your answer in a system design interview?
What the interviewer wants to hear. A repeatable order that you say aloud.
Sample answer to practise aloudI follow the same order every time. First, I ask about requirements, both functional and non-functional, like latency and availability. Second, I make a rough estimate of the traffic and the storage, so I know the scale. Third, I draw a simple high-level design with the main components and the data model. Then I go deeper into the part that matters most, usually the data store or the bottleneck. At the end I discuss failure, monitoring and how the system can grow. I say each step aloud, so the interviewer can follow my thinking and guide me.
How would you use a cache, and what are the risks?
What the interviewer wants to hear. A named pattern, expiry and at least two real risks.
Sample answer to practise aloudI would use a cache for data that is read often and changes rarely. The most common pattern is cache-aside: the application checks the cache first, and on a miss it reads from the database and saves the result with a time to live. The risks are stale data, a cache stampede when a popular key expires and many requests hit the database together, and an unclear invalidation strategy. To reduce these risks, I choose a sensible expiry time, add a small random variation to it, and decide how much stale data the business accepts.
How do you scale a database?
What the interviewer wants to hear. A sensible order: simple steps first, then replicas, then sharding with its cost.
Sample answer to practise aloudI start with the simplest options: better indexes, query tuning and a bigger machine. Then I add read replicas, which help when reads dominate, but replicas can lag behind the primary. When writes or data size become the problem, I use sharding: splitting data by a key, such as a user ID, across several databases. Sharding brings complexity. Queries across shards are hard, and moving data between shards is painful. So I pick the shard key carefully and delay sharding until it is really needed.
How do you talk about trade-offs and consistency?
What the interviewer wants to hear. Every decision stated together with its cost, tied to the product.
Sample answer to practise aloudI try to say each decision together with its cost. For example, I choose eventual consistency for a news feed, because it gives lower latency and higher availability, and users can accept a delay of a few seconds. For payments, I choose strong consistency, because correctness is more important than speed. When a network partition happens, a distributed system must choose between consistency and availability, and I explain which one the business prefers for each part of the system. This shows that I think about the product, not only about technology.
How to say the key terms
- scalability
- skay-luh-BIL-ih-tee
- sharding
- SHAR-ding
- cache
- cash
- availability
- uh-vay-luh-BIL-ih-tee
- latency
- LAY-ten-see
- bottleneck
- BOT-ul-nek
Useful phrases for answering
- Let me clarify the requirements first.
- Can I assume that…?
- Let me do a rough estimate.
- The main bottleneck here is…
- The trade-off is…, so I would choose…
- To summarise the design,
- If we have time, I would go deeper into…
Common mistakes to avoid
- Starting to draw before asking questions. Spend the first minutes on requirements.
- Being silent while thinking. Say "I need a moment to think about the data model", so the interviewer knows you are working.
- Naming many technologies without reasons. Choose one and explain why it fits.
- Ignoring failure and monitoring. One sentence about what happens when a node dies shows experience.
Frequently asked questions
Do I need numbers in a system design interview?
Yes, rough ones. Say them aloud: requests per second, storage per year. They need not be exact, but they show that you think about scale.
What if I do not know a technology the interviewer mentions?
Say so, then reason from the properties you need: "I have not used it, but if it is a key-value store with low latency, I would use it for…"
How long should I speak without a pause?
Not more than a minute or two. Stop at natural points and ask, "Does this direction make sense to you?"
Reading an answer is not the same as saying it. Practise each question out loud, then compare the meaning and the language of your own answer.
Try SpeakRole ↗Other topics in this area