receive long URL, return shortened url
receive shortened URL, redirect to long url
should be highly available (aka fast)
100s of users per minute
REST
shorten
retrieve
one table
columns:
original url, shortened url, created_at
You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design. If you are unfamiliar with the tool, you can simply describe your design to the chat bot and ask it to generate a starter diagram for you to modify...
Pretty simple. only two possible types of request, basically a save and retrieve.
save will take long url, generate. short url, then return it to the client
retrieve will take short url, map it back to long, and redirect
wanted to keep this as simple as possible. no need for users or auth
extremely high use could bog it down
many stale URLs, could be cleaned up
add periodic cleanup logic or expiration