Summary
In this chapter, we designed the URL shortener system. We first looked at why it’s a useful service to have and what some of the real-world use cases for such a service are. This helped us understand the importance of designing this system correctly. This was also useful to understand the scale at which such a system can be used.
We then started listing the requirements, both functional and non-functional. We classified some of the functional requirements as core and some as extended. Then, we went on to list the core APIs needed for this system to function. We also did some quick calculations to understand the scale, storage needs, and the number of characters needed in the shortened URL to serve the 3.5 T URLs.
After this, we started exploring various solution ideas to solve the core challenge, namely how to assign a unique shortened URL for a long URL. In part of the exploration, we identified various problems and tried to mitigate them by using some strategies...