We must have a system that takes in a url of unspecified length, and returns a link to a shorter url. We must be able to have a api, that when pinged with the shortened url, returns the original one. This means we must have a way of storing both urls, and need db space for both.
The system must have an up time of .9999% uptime. If the system goes down, people cannot access their links which is by far the most crucial aspect of this build. Also, the system must have relatively low latency from request to post.
I have no clue how to estimate users. But it will be mostly db reads, very few writes comparatively (as each time a new url is added, that is the last time it will be added). You could include a cache for popular urls that are visited to limit time required to serve the new urls, you could also geocache it as well for further speed increases..
you would need an api that can accept a request and pass it back
Mainly just an api that serves from a db.
You'll need a DB that's sql, as it's high reads low writes, I can't remember what it's called but you would want a "" type of db since its many 1:1 reads. you don't have to really store anything except the two urls, since youre just returning the original when the new one is called.
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.