Receives full length URL and returns shortened URL.
List non-functional requirements for the system...
100,000 URLs per day
100,000 / 24 = 4,000 URLs per hour
4,000 / 3600 = About 1 URL a second
POST long URL -> returns short URL
GET short URL -> returns long URL
The database can be a key-value store mapping short URL to long URL
The client can POST or GET to application server.
Application server saves URL mapping to key-value store.
Explain how the request flows from end to end in your high level design. Also you could draw a sequence diagram using the diagramming tool to enhance your explanation...
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...
Explain any trade offs you have made and why you made certain tech choices...
Try to discuss as many failure scenarios/bottlenecks as possible.
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?