This post explains a simple way to deal with questions like TinyUrl in Interviews. Although the content replicates designgurus, I’ve added my touch of understanding in explaining the complex concept in a simple way.
Basically it’s a computer that takes in long url and gives a short url. It seems like there is not much going on here, but consider the following points that make it interesting:
- No signup/login needed — Anyone, any number of times can use unlimited long urls to generate tinyUrls
- Which means we are talking about millions of people around the world, using **100’s of millions **of urls.
- This will make us think, what would be db size to store the urls, what if we allow user signup/login, what could be the user table size ?
- How many servers we need, to handle such a traffic?
- And how can our servers be super fast ?
- Our system should never go down and be resilient to handle such a traffic
Now, the above questions have grabbed your attention, let us start:
The 2 things Functional & Non-Functional Requirements give us a start.
Func Reqs basically tells us what are few main features our system should support
Non Func Reqs tells us how the system should perform.
It’s like participating in a race and how well do you perform to win the race.
To win the race we need to be on our top performance and how do we get there? by covering all the basics, by planning for all the possible failures, by solving the problems that comes along the way.
Ok, enough of the motivation :)
Few important things we can cover in any system design are
And 1 Major Problem . I don’t wanna leave y’all on boring long post. Each of them are discussed in detail in TinUrl — Part 2. See you there.
Top comments (0)