Today's Free Drill (IST)easyTarget Chapter 1
45:00remaining
Problem Archive →URL Shortener (TinyURL)
Design a distributed URL shortener service like TinyURL or Bitly. The service must ingest long URLs, generate compact 7-character aliases using Base62 encoding, and handle high-throughput redirection with sub-10ms P99 latency while guarding against hash collisions and coordinate server failures.
Functional Requirements
- Accept any valid HTTP/HTTPS URL and return an abbreviated 7-character alias (e.g., https://tiny.url/aB3x9Zq).
- Redirect client requests from the alias to the original target URL using 301 or 302 HTTP status codes.
- Allow users to optionally specify a custom 7-to-16 character alphanumeric alias with collision detection.
- Support configurable link expiration dates with automated background tombstoning.
Non-Functional Requirements
- High read-to-write ratio (100:1) with read redirection latency under 10ms P99.
- 99.999% availability for the redirection path (surviving single datacenter outages).
- Generated short URLs must not be easily predictable or enumerable by scrapers.
Architectural Deliverables (8-Step Framework)
Autosaved to browserReady for Evaluation?
Submitting unlocks the official reference solution, rubric checklist, and architectural diagrams.
Target Scale Benchmarks
Daily Active Users (DAU)100 Million daily active users clicking links, 10 Million new URLs created per month.
Read Query Load40,000 redirection queries per second average, peaking at 100,000 QPS globally.
Write Ingestion Load40 new short URLs created per second average, with peak ingestion of 200 QPS.
Storage Growth RateEach record is ~500 bytes. 120M new URLs per year requires ~60 GB storage/year (~300 GB over 5 years).
Progressive Hints (0/3)Penalty: -15% score/hint
Hint 1 locked
Hint 2 locked
Hint 3 locked