educative.io

Educative

URL Requirements unacceptable?

In Designing a URL Shortening service like TinyURL - Grokking the System Design Interview?

You have the following criteria:

If multiple users enter the same URL, they can get the same shortened URL, which is not acceptable.

Why is it not acceptable? If they hand typed the same longer URL, they would also get to the same place. I’m unclear why that would be a bad thing? The URL itself is not a secret nor do I understand the need for it to be?

Or is this simply an arbitrary boundary being set to help create the question?

Hi @Jo_W_Guthrie
This is a design decision.
As we are focusing on user-based shortening service so we set the requirement of different users having different responses.

There can be a lot of things that the creator would like to do with their short URL e.g., counting how many people clicked a short URL or ad campaign management like I will create two short URLs and share them in separate ads for Google and Facebook to see how different Ads are behaving.

2 Likes