Loading...
API should be the following:
string get_short_url(long_url)
string get_long_url(short_url)
We have a distributed counter and we increment by 1 for each long url and store in a distributed database.
Maybe we use multiple servers each given a range of counters and use a loadbalancer.
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.