URL Shortener (Bitly)
Difficulty: Easy
What It Tests
Core distributed systems fundamentals — hashing, redirection, and building a read-heavy globally available service.
Topics Covered
- API Design
- Caching
- Database Design: SQL vs NoSQL
- Load Balancing
- Networking Essentials
- Key-Value Stores at Scale (DynamoDB)
- Rate Limiting
Hello Interview Breakdown
Read the full Hello Interview breakdown →
Approach Hints
- Hash the long URL (MD5/SHA256 truncated or Base62 encoding of a counter), store in a KV store (DynamoDB/Redis) with the short code as key
- Redirect via 301 (cacheable) or 302 (trackable)
- Add a CDN layer in front for popular short URLs
- Rate limit writes per user/IP to prevent abuse