Loading...
Assume we have
CreateTinyUrl:
GetFullUrl:
url table
All the traffic goes
The main difficulty is how to generate a uuid for the short url. We can use a short url with the length of 8 in base64. 64 ^ 8 = 2 ^ 48.
epoch in seconds: 100 * 365 * 24 * 60 * 60 = 3153600000 2 ^ 34
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?