create_user(username: string, password: string) -> userid: string
create_mapping(uid: string, long_url: string, end_time: Date) -> short_url: string
redirect(short_url: string) -> long_url: string
deactivate(uid: string, short_url: string) -> success: bool
Schema:
{short_url: string, uid: string, long_url: string, end_date: Date}
{uid: string, username: string, salt: string, salted_password: string}
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?