Understanding the Problem Space
URL shorteners convert long URLs into short ones — https://example.com/very/long/path becomes https://bit.ly/abc123. At small scale this is trivial. At bit.ly scale (10 billion links, 6 billion clicks per month) it becomes a fascinating distributed systems challenge.
Before designing anything, ask clarifying questions: What is the expected read-to-write ratio? (Typically 100:1 — reads far outweigh writes.) How many new URLs per day? Do URLs expire? Are custom aliases needed? Do we need click analytics? These questions define requirements and prevent over-engineering.


