Loading...
1 Million URL = 10^6
-- Each URL shortened to alpha numeric string (6 characters )
-- 62 possible character (A-Z, a-z, 0-9)
-- 62^6 = 56,800,235,584 potential unique URLs
ID (primary Key)
original_URL
shortened_URL
When a user accesses a shortened URL, the request flow would be:
When a user accesses a shortened URL, the request flow would be:
Here’s how these components interact at a high level:
API Calls
Route to
Store/Retrieve
Route to
Lookup
Return Data
Redirect User
Track Requests
Cache Lookups
User
API Gateway
Shortening Service
Database
Redirect Service
Analytics Service
Caching Layer
In this diagram:
Failure Scenarios
Bottlenecks
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?