Design a URL Shortener: System Design Interview Guide
February 14, 2026
Technical Tips5 min read
Design a URL Shortener: Complete System Design Answer
URL shortener design (like bit.ly) is the most common introductory system design question. It tests hashing, database selection, caching, and analytics — all in a relatively simple system. This is expected at the L3-L4 level at Google and equivalent.
A strong URL shortener design covers: hash generation (base62 encoding), collision handling, database choice (NoSQL for high write throughput), caching (Redis for hot URLs), and analytics (click tracking, geographic distribution, referrer data).
Design Walkthrough
- Requirements — 100M URLs/month creation, 10B redirects/month (100:1 read/write ratio)
- URL Encoding — 7-character base62 string = 62^7 = 3.5 trillion unique URLs
- Storage — NoSQL (DynamoDB/Cassandra) for high write throughput, ~500 bytes per URL record
- Cache — Redis caches hot URLs, reducing DB reads by 80%
- Redirect — 301 (permanent, cached by browser) vs 302 (temporary, enables analytics)
- Analytics — Kafka for click event streaming, batch analytics in data warehouse
More system design: fundamentals, cheat sheet.
Share:
#TechnicalTips#InterviewPrep#CareerGrowth