Generate short url when given a long url
Direct to the long url when given a short url
High abailability
Reliable
Scalable
About 100M users
getShortUrl()
getLOngUrl()
Will use No_sql database, Cassandra
User made a request to get a short URL, with the Long URL pass in, it comes to the shortUrl service, it will store them in the database
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?