apko sir 4 ro traf se pranam hai you are a really good teacher apne sare cases bhi cover kar liya plus sir mother tounge me jo connection ban ta hai wo english me nahi ho sak ta infinite gratitude for you please keep teaching in hindi
Another way of generating shortURL is, and I think it is not very optimized, but worth talking during the interview - in case we choose to use SQL database, store the row of long URL without mapping, it will generate a ID in the DB, Base 62/64 encode the ID, store the encoded value back in the table record and return to the user. This is slower as there will be two writes per request. Also read will be done by a query and if we index short URL field, this makes the things faster. Thoughts?
A suggestion, I'll let you think more on this. Use SQL db just for keeping id (probably two instances to avoid single point of failure). These databases only maintains a single row for counter value (updates every time). Use this approach to pre-generate the URLs and store them in different database, maybe dynamodb or sql (you might need sharding capability at huge scale). Let me know if you make sense from it. Happy Learning :)
Looks like all these just copy and paste. Can you please explain how are you generating 7 Char key from the counter when the counter is 1 or when it is 32000000
take base62 of counter value; append the remaining characters as any random string to make it of char 7 length. You can be sure it will be unique because the prefix is always unique. Hope it helps. Base62 (61) = 11 Base62 (1000001) = 4C93
At timepoint 15:19, according to my calculation, the total storage requirements is in petabytes: 320 billion * 2000bytes = 320 * 10^9 * 2 * 10^3 = 640 * 10^12 = 640 peta bytes.
apko sir 4 ro traf se pranam hai
you are a really good teacher apne sare cases bhi cover kar liya
plus sir mother tounge me jo connection ban ta hai wo english me nahi ho sak ta
infinite gratitude for you please keep teaching in hindi
Happy Learning
Very good 😊
bhai, maza aa gya!
aur ye jo maza h, woh sabko aana chahiye 😁
Share karo playlist
Another way of generating shortURL is, and I think it is not very optimized, but worth talking during the interview - in case we choose to use SQL database, store the row of long URL without mapping, it will generate a ID in the DB, Base 62/64 encode the ID, store the encoded value back in the table record and return to the user. This is slower as there will be two writes per request. Also read will be done by a query and if we index short URL field, this makes the things faster. Thoughts?
A suggestion, I'll let you think more on this.
Use SQL db just for keeping id (probably two instances to avoid single point of failure). These databases only maintains a single row for counter value (updates every time).
Use this approach to pre-generate the URLs and store them in different database, maybe dynamodb or sql (you might need sharding capability at huge scale). Let me know if you make sense from it. Happy Learning :)
awesome sir
Looks like all these just copy and paste. Can you please explain how are you generating 7 Char key from the counter when the counter is 1 or when it is 32000000
take base62 of counter value; append the remaining characters as any random string to make it of char 7 length. You can be sure it will be unique because the prefix is always unique. Hope it helps.
Base62 (61) = 11
Base62 (1000001) = 4C93
At timepoint 15:19, according to my calculation, the total storage requirements is in petabytes: 320 billion * 2000bytes = 320 * 10^9 * 2 * 10^3 = 640 * 10^12 = 640 peta bytes.
Yes 640GB seems off in the video.
pronounciation thik kar uske baad design seekhana
Haan bhai improvement karenge
Thanks for feedback 🙂
@@MsDeepSingh sorry if I sounded rude.
@mayank he has given price less lecture without taking any price
and I loved his pronunciation
you should be banned from youtube