100 000000 /(24 * 3600 * 30) = 38 URL creates per sec
100 0000000 / (24 * 3600 * 30) = 380 redirect per sec
Read Write Ratio 10:1
So assume 38 * 10 URL creates per second in peak traffic
3800 redirect per sec in peak traffic
POST /v1/api/create
request:{
original_url
}
response:{
statusCode
message
id
shortern_url
}
GET /v1/api/{shortern_url}
response:{
statusCode: 301/302/XXX
message
redirect_url
}
Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.
Define the data model. Identify the main entities, their attributes, and relationships. Consider the choice of database type (SQL vs NoSQL) and justify your decision based on access patterns...
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.