URL Shortener Design
Preview mode. Log in to write architecture notes, save your answer, and get feedback.
URL Shortener Design
Design a URL shortening service similar to TinyURL or Bit.ly. Functional Requirements: - Given a long URL, generate a unique short URL - When users access the short URL, redirect them to the original long URL - Users can optionally set custom short links - Links should expire after a configurable time period Non-Functional Requirements: - The system should be highly available - URL redirection should happen in real-time with minimal latency - Shortened links should not be predictable Scale: - 100M new URLs per month - 10:1 read to write ratio (1B redirections per month)
Examples
How would you implement analytics (click tracking, geographic data)?
Approach hint
Think about the read-to-write ratio - this system is read-heavy. What does that imply for your architecture?
Common mistake
Skipping assumptions, edge cases, or trade-offs can make an otherwise good answer feel incomplete.