HLD-201·Caching & Edge
Medium · 1,000 ptsHigh-Throughput URL Shortener & Redirector
Design a URL shortening and redirection service capable of sustaining extreme read-heavy viral traffic spikes while surviving storage node failures within a tight monthly cloud budget.
Max p99
≤ 45 ms
Availability
≥ 99.5%
Budget
≤ $2,100
Functional Requirements
- FR-1POST /shorten — Accepts a long URL and persists a unique 7-character short_code mapping.
- FR-2GET /{short_code} — Resolves the short_code and returns an HTTP 301/302 redirect with minimal latency.
- FR-3PATCH & DELETE /{short_code} — Allows link owners to update destination URLs or revoke/delete short codes and expire cached redirects.
- FR-4Active links must remain resolvable during single-node hardware faults within >= 99.5% availability.
Workload Profile
Baseline Load32,000 Read RPS / 1,800 Write RPS
Peak Viral Surge100,000 Read RPS / 5,000 Write RPS
Active Working Set24 GB hot link mappings (500 GB total)
Traffic DistributionHeavy Zipfian skew on viral short_code keys
Consistency Model
Eventual consistency (< 5s propagation) acceptable for reads; newly created short codes must be durably stored.
Solutions Locked
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Loading solutions...
Submission History (0)Select to replay
No submissions yet
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Design Write-up
0 boxes · 0 edges
0 words