How to implement TinyURL (System Design Interview)

How to implement TinyURL (System Design Interview)

KA Education

4 года назад

75,584 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@DocOmally101
@DocOmally101 - 15.12.2023 04:41

Could you do more system design videos?
This was super insightful and really well explained.
Any of these would be so helpful to understand in your delivery and explanatory sttyle:
Google Docs
Twitter
LeetCode
API Rate Limiter
BookMyShow
Chat Application
E-Commerce Portal
Splitwise
Vending Machine
Google Autosuggest
Uber
Parking Lot
Stock Exchange
Logging System
Authentication Service


Either way, thanks for the video man!

Ответить
@9939364566
@9939364566 - 09.12.2023 10:45

Amazing way of explanation.... I watched many YT videos and they all confused me. You nailed it ✌️ Tysm

Ответить
@vaibhav_cs
@vaibhav_cs - 14.11.2023 16:54

Excellent approach and proper delivery of content !

Ответить
@AnangPhatak
@AnangPhatak - 07.11.2023 15:46

Please make more videos on systems design. The content here is presented succinctly with non-complex simple diagrams and licid explanation.

Ответить
@chirut4327
@chirut4327 - 02.11.2023 13:48

base62 encoding can result in a string of any length. And we are not supposed to take first 7 chars to avoid collision. So that means we take what ever output we get from base64.
This is what I want to hear from these videos, but believe me none of them emphasize on this. They just say blabla and use base62.

Ответить
@BestURLShortenerBioPageQRCode
@BestURLShortenerBioPageQRCode - 11.09.2023 12:50

Thank you for sharing this much of information.👍👍

Ответить
@rohinirenduchintala
@rohinirenduchintala - 11.07.2023 06:47

The best comprehensive tinyURL video for system design i've seen so far. Please make more!

Ответить
@DK-ox7ze
@DK-ox7ze - 19.04.2023 00:16

If we add 10-15 bits at the end of counter number then it will increase the base62 output size and exceed the 7 character limit. So can you clarify how that addition of random string works?

Ответить
@hamzasanwar
@hamzasanwar - 09.02.2023 02:46

Why base 62 not base 64

Ответить
@mohamedelidrissi810
@mohamedelidrissi810 - 05.02.2023 00:55

For caching, will it be better to have some kind of background job that populates the cache with the most popular URLs from the database? Else if you're always adding a URL to the cache, then it's no longer just the popular URLs but all of them (or at least the capacity of the cache).

Ответить
@RandomShowerThoughts
@RandomShowerThoughts - 09.01.2023 23:26

this was very good, clean and concise. Really like this video, especially the logic as to not pick sql

Ответить
@talktovideos4349
@talktovideos4349 - 23.11.2022 11:00

Thanks a lot for making this video

Ответить
@hyrdeshgangwar
@hyrdeshgangwar - 16.10.2022 23:43

Good Stuff!

Ответить
@funnyclipz520
@funnyclipz520 - 27.08.2022 09:56

why can't the database (mongodb) itself generate an auto increment ID and then server can generate MD5 or base62 after adding salt to it ?

Since db upon creation would never fail to generate a unique primary key it would avoid single point of faliure.

Making a distributed solution for generating ID seems overkill here..


I am new to this so let me know if there is a problem in this solution.

Ответить
@bayareacarnatic
@bayareacarnatic - 21.08.2022 17:21

If you are using a unique counter why do you still need md5 and base62 encoding.? And then you need additional complexity like integrate zoo keeper etc just to maintain counters.

Ответить
@benjaminwestphal9685
@benjaminwestphal9685 - 15.08.2022 20:42

How does your hashing work o.O - you take an 128 bit md5, and then make a base62 out of it with 20+ chars. How are you sure there are not collisions when only taking a subset of the base62 aka md5 hash(just differently displayed)? o.O

Ответить
@niteshupadhyaya007
@niteshupadhyaya007 - 16.07.2022 01:19

The counter example is incorrect - Another solution could be to append the user id (which should be unique) to the input URL. However, if the user has not signed in, we would have to ask the user to choose a uniqueness key. Even after this, if we have a conflict, we have to keep generating a key until we get a unique one.

Ответить
@GauravSharma-wb9se
@GauravSharma-wb9se - 03.07.2022 18:40

does Base62Encoding of counter guarantee to return only 6 characters or 7 characters string ? if this is the case then when we do Base62Encoding on MD5 hashed value, in that case also it should return 6 or 7 characters of string...…please clear this doubt

Ответить
@booggerg
@booggerg - 31.05.2022 19:38

LRU cache eviction has a big short coming. If we assume the cache is always at capacity with each new shortURL creation, then that means one of the top 20% URL will surely get evicted from cache, to make room for a random unpopular URL someone has submitted.

This eviction approach means there will be a steady state of URLs in the cache that are not popular at all.

Ответить
@studyiq5015
@studyiq5015 - 27.05.2022 11:21

Great explanation Plz post more system design videos Thanks :)

Ответить
@ubaidmanzoorwani6254
@ubaidmanzoorwani6254 - 17.05.2022 15:34

Why do we have to use base62enode after MD5???
Why is MD5 not enough??

Ответить
@stiffyBlicky
@stiffyBlicky - 12.05.2022 01:16

This video is inaccurate base62encode(0) is not aAbB123

Ответить
@mrowox
@mrowox - 06.05.2022 00:52

Concerning the round robin approach to load balancing not taking server load into consideration, such that it might still forward request to an overloaded or slow server, I believe that due to the style of this approach, if one server is overloaded, then all the servers are possibly overloaded else seeing that it would have been distributing the loads equally except if the servers are not of equal capacity which will then bring the question of why will you spin up a server of lesser capacity

Ответить
@mrowox
@mrowox - 06.05.2022 00:44

You mentioned zookeeper. what is the number of servers is not stable, could be 8 today, then 5 tomorrow, then 10 next tomorrow. How does zookeeper manage those ranges based on thee number of servers available. I really need to understand this. Please help

Ответить
@chilly2171
@chilly2171 - 14.03.2022 13:21

what if the custom url entered by the user already exists in the database? it results in duplication.

Ответить
@rajathrao3209
@rajathrao3209 - 06.03.2022 23:10

Would love to see more of these system design videos!!!

Ответить
@narindersharma303
@narindersharma303 - 14.01.2022 19:24

if we have to base60 the #, then why not precompute it and distribute it to servers, i.e. S1 will keep the hash60 of 0-1M , S2 will keep the hash from 1M-2M and so on.

Ответить
@kavyapallari2902
@kavyapallari2902 - 03.12.2021 14:37

Good video

Ответить
@kumarmanish9046
@kumarmanish9046 - 25.11.2021 08:28

What about database? He never talked about how to store in db

Ответить
@dhruvdnar
@dhruvdnar - 17.10.2021 08:13

You rushed through some important aspects. EG: Why would base 62 give 21-22 chars? Its because Base encoding encodes 6 bits at a time. 128/6 = 21

Ответить
@jochenjochen4246
@jochenjochen4246 - 17.08.2021 04:16

i am curious why 128 bit goes to about 20 chars by using MD5 + base 64/62. 128bit to 32 char in hex. but what next? thanks in advance

Ответить
@renguomin1
@renguomin1 - 12.08.2021 03:27

Why introducing a counter guarantees you no collisions?

Ответить
@Freez2018
@Freez2018 - 05.08.2021 04:02

Hey Kevin, should we wait for new system design videos?

Ответить
@tgiflying
@tgiflying - 26.07.2021 03:16

Why do MD5 or SHA256? Just pick 7 characters at random with replacement from the set of base62 symbols

Ответить
@alexbordon8886
@alexbordon8886 - 25.07.2021 23:18

omg this is the best system design tutorial for tinyURL !!! Each minute hits the point instead of bullshit. 赞赞赞

Ответить
@royalsing
@royalsing - 12.07.2021 23:36

Why no one talks abt how Twitter generates its I’d … that’s the most simplest instead of depending on zoo keeper and a cluster of counter services

Ответить
@NK-ju6ns
@NK-ju6ns - 08.07.2021 08:30

aka :)

Ответить
@sindhumohana6164
@sindhumohana6164 - 07.07.2021 13:46

Best video on this Topic !

Ответить
@arjunsankarlal5296
@arjunsankarlal5296 - 05.07.2021 05:06

Well explained!

Ответить
@lucianomonterovidela
@lucianomonterovidela - 02.06.2021 21:26

One question, If we take the first 7 characters even with numbers differents, we can have colission. What I didnt undestand?

Ответить
@kakakukukakakuku
@kakakukukakakuku - 27.04.2021 09:57

A good candidate would be the person who has watched this video :-)

Ответить
@jamiepearcey9335
@jamiepearcey9335 - 03.04.2021 18:28

Great video explanation.

Ответить
@eleanorwang6226
@eleanorwang6226 - 22.03.2021 06:37

Very clear illustration! Thank you

Ответить
@cbest3678
@cbest3678 - 11.03.2021 11:20

Can someone explain why zookeeper itself is not single point of failure in this case?

Ответить
@PallNPrash
@PallNPrash - 20.02.2021 20:09

Excellent video!! You packed everything of importance in a nice, short video. GREAT job!! And THANK YOU!!

Ответить
@technicallearning5379
@technicallearning5379 - 19.02.2021 02:34

Excellent!!

Ответить
@malcolmdinz1912
@malcolmdinz1912 - 15.02.2021 12:01

Best TinyURL design video I've found, and some concepts here can be applied to other design questions too. Thanks for making this!

Ответить
@cynthia7000
@cynthia7000 - 06.02.2021 06:54

Good quality! Would love to see more of these system design videos!!!

Ответить
@tanujaphadke8219
@tanujaphadke8219 - 30.01.2021 20:58

this is the BEST video on this topic

Ответить