Design a URL shortener (like Bitly)
Below is a full mock interview following the seven steps of the framework. You're the candidate: at each Guess before you read on, stop and answer first.
Step 1 · Clarify the features and cut the scope
Minutes 0–5 · How this step works
Interviewer: Design a URL shortener, like Bitly.
You: A few questions first. The core is creating a short link and redirecting anyone who opens it. Can people pick their own alias, like /summer-sale? Do links expire?
Interviewer: Custom aliases, yes. The creator can set an expiry date.
You: Do creators see click counts? Can a link's destination change later?
Interviewer: Clicks per link by day and country, no live dashboards. Destinations never change, but we must be able to disable a link, say if it points to malware.
You: Who creates links?