System Design, Redis & Distributed Systems
5-8 Years (Senior)
Hard
Production Scenario
How do you design a Global URL Shortener (Bitly-scale) handling 100M URLs and 10 Billion clicks/month?
Real-World Scenario / Incident Description
Interview system design question: Design a short link redirection engine with sub-10ms response times globally.
180 views
•
Updated 1 month ago
Key Architecture Decisions
- Base62 Encoding:
[a-z, A-Z, 0-9]. A 7-character string allows $62^7 \approx 3.5 \text{ trillion}$ unique URLs. - Distributed ID Generator (Snowflake / Redis Atomic Counters): Generate unique 64-bit auto-incrementing integer -> Convert to Base62.
- Caching & CDN:
- Return HTTP 302 (Temporary Redirect) if click tracking analytics are required on every hit.
- Return HTTP 301 (Permanent Redirect) if latency is prioritized (browser caches redirect permanently).
- Cache hot 20% of URLs in Redis cluster (80/20 Pareto principle).
Related Concepts:
#System Design
#Base62
#URL Shortener
#Distributed ID
More System Design, Redis & Distributed Systems Interview Questions
How does the Redis Redlock Algorithm provide Fault-Tolerant Distributed Locking across independent Redis nodes?
Read →
Explain the 3 High-Scale Cache Failure Patterns: Cache Avalanche, Cache Breakdown (Dog-Piling), and Cache Penetration, with mitigations.
Read →
Compare Rate Limiting Algorithms: Token Bucket, Leaky Bucket, Fixed Window Counter, and Sliding Window Log/Counter.
Read →
How do you design a Real-Time Notification System delivering to 10M concurrent users with WebSockets and Redis Pub/Sub?
Read →
How do you design an Idempotent Payment Processing Architecture with the Saga Pattern across Microservices?
Read →