Amazon Interview question: Learn hashing and consistent hash ring

  Рет қаралды 154,040

Tech Dummies Narendra L

Tech Dummies Narendra L

Күн бұрын

Learn Hashing and Consistent hashing with this easy to understand video.
------------------------------------------------------------------------------------------------------------------------------------
Java Code by Varun vats: gist.github.com/VarunVats9/5b...
------------------------------------------------------------------------------------------------------------------------------------
Applications of consistent hashing in load balancing:
/ improving-load-balanci...
uber's Ringpop: eng.uber.com/intro-to-ringpop/
Cassandra DB: docs.datastax.com/en/cassandr...

Пікірлер: 178
@ShuKlaDeepti
@ShuKlaDeepti 3 жыл бұрын
Thanks much. All tutorials just draw the ring and explain this concept that is hard to understand. First time I understood what consistent hashing is after watching this video!!!
@cruxrebels
@cruxrebels 5 жыл бұрын
Consistent Hashing begins at 12:35
@dantedt3931
@dantedt3931 5 жыл бұрын
Thanks!
@govindraokulkarni
@govindraokulkarni 4 жыл бұрын
big thanks! saved my 12 mins _/\_
@JinayShah
@JinayShah 4 жыл бұрын
Thanks!
@kmdr
@kmdr 3 жыл бұрын
Worth watching the whole video to fully understand why you need consistent hashing in the first place.
@WaseemM2
@WaseemM2 5 жыл бұрын
One correction or clarification. The hash for two keys might not be the same for two different keys but the modulo value can be same, which is where bucket collisions occur. Though there are hash collisions they are extremely rare due to possible large values available but the mod of hash will find many collision and that's where the linked list in a bucket helps. Good video.
@sureshchandjain2504
@sureshchandjain2504 Жыл бұрын
Nice catch !! that's what I was thinking too, whenever we talk about hashing we always keep a consideration that anyway hash function will return unique values for unique inputs. How hash function achieves that's a unique research topic in itself
@carlaludgate6597
@carlaludgate6597 4 жыл бұрын
Best explanation of consistent hashing I've seen. Thank you!
@sharejero1121
@sharejero1121 6 жыл бұрын
Went through many vedios to understand this. But your explaination is very good and in laymen terms so any new person like me can also understand correctly. Thanks for posting this.
@ayushaggarwal2690
@ayushaggarwal2690 3 жыл бұрын
Out of all other resources out there, your explanation on consistent hashing is the most concise. Thank you !!
@MyLifeWithKai
@MyLifeWithKai 5 жыл бұрын
I have seen many videos on consistent hashing but this is the best s far! Running trough an examples help retain concepts so well!!!
@saaqibz
@saaqibz 5 жыл бұрын
Your explanation is very clear and nice. Thank you! One point is I think I like the explanation of consistent hashing using a circle diagram better, but this is very useful too esp when you're thinking about implementing it.
@nreed7718
@nreed7718 2 жыл бұрын
I found the table to be a nice, concrete way to explain how this would work in practice.
@atulnath1474
@atulnath1474 6 ай бұрын
So great video, would like to add one thing here: We have two challenges which we try to solve with consistent hashing: 1. Minimize data movement/rehashing when we add/remove servers. 2. Evenly distribute data across servers. Your video talks about the first problem and how to fix it. For the second one, we can use the concept of Virtual Servers, which allows each server to occupy multiple portions distributed throughout your hash ring. This helps with skewed data; for example, if you add a server in between 2 existing servers, then the load on other servers is technically more than this new server, and the server after this. Basically, data isn't evenly distributed amongst servers, hence skewed. Having the same server hashed in different locations over the hash ring helps solve this problem as well
@topoisonfungus
@topoisonfungus 5 жыл бұрын
Thank You! Great words and very nice vertical stack explanation! One of the humble and clearest videos so far on CH unlike some of the flamboyant ones on YT! Subscribed! \../
@leo71648
@leo71648 4 жыл бұрын
You have explained in a very clear and easy way without using so many typical words.
@talesara74
@talesara74 2 жыл бұрын
Nicely explained. Honeatly I saw many videos but none of them come even closer to this one. Thanks a lot
@reyou7
@reyou7 5 жыл бұрын
best explanation on KZfaq, thanks man!
@TigraStyle
@TigraStyle 3 жыл бұрын
+1 on that!
@BittiKit
@BittiKit 5 жыл бұрын
Clearest video on this topic that I've found. Thanks!
@YashSharma0605
@YashSharma0605 Жыл бұрын
Nicely explained. I had seen the circular implementation of Hash Ring and was wondering how will it be implemented in the system. In theory we can have a ring but while implementing it we'll have the table like structure which confused me. This explanation was a great help to me. Thanks!!
@hitesharora751
@hitesharora751 5 жыл бұрын
Good Work. Thanks for sharing your knowledge. Keep it up. (Y)
@ritingoel9102
@ritingoel9102 3 жыл бұрын
great explanation :) and also the thing is the person who does know how Hashing works how the hash map works also able to understand because you covered from A to Z. Thanks for the Video :)
@mudassarh4268
@mudassarh4268 2 жыл бұрын
your explanation is the easiest to understand. I really have huge respect for you and given a chance would definitely return the favor in whatever I can. Stay blessed and keep being awesome
@mananshah3471
@mananshah3471 3 жыл бұрын
Excellent stuff! Coincidentally, the dog started barking exactly when called for it at 15:31 😂
@navpreetkaur4902
@navpreetkaur4902 2 жыл бұрын
thanks so much, not sure if I can really thank enough with the kind of knowledge I am gaining from all your videos, please keep up a good work like this.
@abhishek08aug
@abhishek08aug 4 жыл бұрын
I have a doubt on the failover part where you mentioned that if the last node is unavailable key-value will go get saved in the first node by following the cyclic order. If this is how it actually works, what happens when the last node comes back up and we make a query for the same key. Will there not be a situation that the system is trying to find this key in the last node but the key is actually saved in the first node?
@ishwaryachandramouleeswara229
@ishwaryachandramouleeswara229 4 жыл бұрын
Very clear and solid explanation! Thanks a ton!
@prafulsinghvit
@prafulsinghvit 3 жыл бұрын
Woaah... This is awesome. First few minutes I was wondering why are we learning hashmap here..and then all of a sudden everything made sense...boom..!! ❤️ Super explanation. Thanks! 🙏
@akshayagrawal2222
@akshayagrawal2222 2 жыл бұрын
@Narendra You are the best. I see many videos on consistent hashing but the way you explained is superb
@helloworld4475
@helloworld4475 5 жыл бұрын
It's so clear! Thanks for the efforts
@AndhraKitchenFoods
@AndhraKitchenFoods 3 жыл бұрын
Great introduction presentation on consistent hashing.
@huseyinbarin1653
@huseyinbarin1653 2 жыл бұрын
Dude, I really enjoy listening to you. Excellent teaching skills.
@prasanthmallepeddi5464
@prasanthmallepeddi5464 2 жыл бұрын
clear and concise explanation on hashing and consistent hashing,kudos.
@gautamtyagi8846
@gautamtyagi8846 3 жыл бұрын
you make things so easier to understand! thanks a lot !
@RahulPrajapati-jb3yh
@RahulPrajapati-jb3yh 3 жыл бұрын
Thanks man for good explanation, I understood if one of the location mede unavailable, rehashing is easy i.e. move data of this location to next location(Drawback is next location will have double load now) and no need to rehash whole table but how does the rehashing happen when a new location added in the ring?
@Aniruddhdwivedi
@Aniruddhdwivedi 5 жыл бұрын
Hi I need your help to understand implementation of concurrent hashmap after Java 8 as it uses RB Tree instead of linked list
@jaatharsh
@jaatharsh 3 жыл бұрын
as mentioned when a Node goes does what happens to the data stored in it? & if during that node downtime data(ex-ABC) intended to be saved on the particular node(Ex-NodeX) is instead stored to the next Node(NodeA) in clock-wise direction what happens when another node takes dead node place? Now when ABC is searched it will check in NodeX but data for it was saved in NodeA.
@ravhaak
@ravhaak 5 жыл бұрын
Excellent, Easy to understand explanation.
@muven2776
@muven2776 5 жыл бұрын
What about the keys present in the 9900 ? when that location is down. are these keys distributed amoung available location ?
@manikandansaravanan5248
@manikandansaravanan5248 5 жыл бұрын
how dose the rehasing happen when a new location added in the ring ?
@vishalchougule3123
@vishalchougule3123 3 жыл бұрын
In the given example, say a location is added that accepts values upto 11k, then the values in the range of say 10K-11K put in first location using ring ,will have to remapped to this location.
@utkarshjadhav7
@utkarshjadhav7 4 жыл бұрын
Execellent explanation! Thank you for the links too.
@ersinerdem7285
@ersinerdem7285 3 жыл бұрын
Is there a load balancer out there which uses this? I cannot see any of them using it. They use only round robin etc.
@santosh0516
@santosh0516 4 жыл бұрын
Very good explanation. Nicely done. Thanks man!
@ashishgupta8394
@ashishgupta8394 4 жыл бұрын
Much better & clear, Thank you :)
@adamhughes9938
@adamhughes9938 4 жыл бұрын
Really great explanation, as usual. Thanks
@HakuSama1024
@HakuSama1024 5 жыл бұрын
Thanks for the video. Is there any way you could use a better mic?
@sivaprasad7278
@sivaprasad7278 5 жыл бұрын
Because if I withdraw money from atm but still reflects to core banking db,internet bank db,atm db,mobile banking db,imps/neft/rtgs db/upi db/mobile banking db etc...,how this will happen in. Back ground if I do transaction in one db through one of payment method as described earlier
@devashish887
@devashish887 2 жыл бұрын
Thanks, man, Nicely explained. I got one question though If a system goes down or removed new value coming will be stored in the next range or cycle back to the first range, But what about if it comes back online which was failed or we want to reduce the load of first server(range) suppose lot of load coming to it. now the search will go to the new range, while the data was stored in a different range. how adding of new range works.
@adamhughes9938
@adamhughes9938 4 жыл бұрын
What happens when that location that failed comes back but some keys were written to the alternative locations. When lookups are performed, wouldn't they go back to the original location where they should have been? Does some reconciliation process occur when brining the failed locations back?
@kristhiantiu4317
@kristhiantiu4317 2 жыл бұрын
very very good explanation, thanks narendra
@codebix1096
@codebix1096 5 жыл бұрын
thankyou soo much for this wonderful presentation
@bibekkakati
@bibekkakati 4 жыл бұрын
When Computer 2 goes down, and at that time if an entry is made (say above 9,500 key) that will get stored in the starting key. But what after Computer 2 becme available later on?
@shubhammehta319
@shubhammehta319 5 жыл бұрын
Nice Explanation, Thank you. I have one Question, What if one more server needs to be added in the hashtable. How we will assign the # function numbers. Like if we go for number 11k for e.g. we know that values for that could have been stored in the first row earlier. it Would make inconsistent as in getting that value will look for the 11k key but it was in the first raw not the last. please Explain that.
@dariopavlovic8640
@dariopavlovic8640 5 жыл бұрын
An obvious approach could be to transfer values from first row to the last row that satisfy this criteria. Consistent hashing isn't perfect I guess, you still have some processing to do if you add a row, but it's much less than with regular hashing.
@kisikatube
@kisikatube 4 жыл бұрын
In this case, you would move keys from 1011 to 11K location, any keys that are more than 9900. Note that in actual you would need to store the keys as well in order to relocate when a new server added. The advantage of consistent hashing is only one neighbor node need to looked at for relocating keys rather than whole data.
@ankursharma3243
@ankursharma3243 5 жыл бұрын
One question on Consistent Hash Ring example, what you explained here. Suppose for (key,value) -> (Dog:Max) , the hash function gave 19234 and then at memory address 2022 we saved the following (key,value). Now if I am retrieving data using map.get(Dog), how does it internally finds out the 2022 address, as the hash function will again return 19234? Where is the mapping of 19234 and 2022 is done internally ?
@TechDummiesNarendraL
@TechDummiesNarendraL 5 жыл бұрын
Yes the hash function will again return 19234 and the mapping is saved in hashtable
@leo71648
@leo71648 4 жыл бұрын
Didn't understand the last part for 10115 no, greater key is not present and we go back and we put on first key but the rule was to find key which is greater than current hash key we got...... ???
@travelbuddy4000
@travelbuddy4000 2 жыл бұрын
Hi, What happens when the node comes back on, how does the data stored on that node behave? Also, when the node comes back up, is that node added with the same random number, if it is a different random number how do we make sure the data is still consistent that was stored prior to node creation?
@DK-ox7ze
@DK-ox7ze 3 жыл бұрын
What happens when you add another computer to the hash set? In your last example, if you add a computer with memory address 13000, it will be greater than 9000, so data will be stored there. So the data which was earlier going to the first node/computer, will now go to the last one. This will cause inconsistencies in retrieval, because data which was earlier stored in first computer will now be searched in the last one, causing old data to be never retrieved.
@ashishgandhi1686
@ashishgandhi1686 Жыл бұрын
But that’s it. It’s just this one range, corresponding to the failed server node, that needed to be re-assigned, while the rest of the hashring and request-node assignments still remain unaffected. Contrast this with the classic hashing technique in which a change in size of the hash table effectively disturbs ALL of the mappings. Thanks to consistent hashing, only a portion (relative to the ring distribution factor) of the requests will be affected by a given ring change. (A ring change occurs due to an addition or removal of a node causing some of the request-node mappings to change.)
@_ipublic
@_ipublic 4 ай бұрын
9:40 Use hash to store key-values pairs, what if for N inputs we get same hashKey and appending N values by nodes. White retrieval time complexity would become linear O(N). How do we get values in constant time though? Any suggestion on that would be highly appreciated.
@putukumar5847
@putukumar5847 3 жыл бұрын
Clear explanation. Thanks Man!
@nreed7718
@nreed7718 2 жыл бұрын
Great explanation. Thank you.
@sivaprasad7278
@sivaprasad7278 5 жыл бұрын
Could you please do video about bank design
@vigneshkumar7073
@vigneshkumar7073 5 жыл бұрын
Performance gonna take a hit, retrieval and put gonna take log(n) instead of n in traditional hash tables. But it is the best solution for consistent systems
@RohanShetty1992
@RohanShetty1992 3 жыл бұрын
Thanks for taking time to create this
@jonydcosta1321
@jonydcosta1321 4 жыл бұрын
Nice explanation. I have a doubt on consistent hash ring. In order to find the key in the Hash table it sounds like we have to do the liner search starting from the start of the hash, compare it to decide on the location to insert the key-value pair. Is it making better in terms of search time if we chose to have the array solution here?
@aniliitb10
@aniliitb10 4 жыл бұрын
He didn't mention it explicitly but as you can see the random numbers are in ascending order. So, even if they are random, they are sorted. You can use this sorted nature to find a key efficiently using binary-like search (if you are a C++ programmer, std::lower_bound() does the same)
@linacao2137
@linacao2137 5 жыл бұрын
Thanks for explaining the concept but would it change the time of find from O(1) to O(log n)? Or you have build a second map between key and index?
@tomtran6936
@tomtran6936 5 жыл бұрын
I have the same question. Why do you think it is O(log n)? My thought, the fact that key index values are picked randomly and we need to loop through the keys (generally all) to compare and find the one that is larger than hashed value makes inserting or looking time become O(n).
@cccc2740
@cccc2740 4 жыл бұрын
Its O(n/k)...k being linked list size
@kchaitanya39
@kchaitanya39 5 жыл бұрын
Doesn't 1011 location will be overwhelmed with values when a key does not fit in 9900 bucket?
@ironhide9955
@ironhide9955 4 жыл бұрын
i too was thinking about it. did you find an answer?
@mramit1924
@mramit1924 4 жыл бұрын
Here you can find answer using virtual server kzfaq.info/get/bejne/sMeCnrJ_29-romw.html
@sonkarshailendra
@sonkarshailendra 4 жыл бұрын
Excellent. I was just thinking, how the value will be retrieved which is stored earlier (in 1011) for keys greater than 9900, when one new location will be added, let's say 10010 or 11000.
@paulbagioli1885
@paulbagioli1885 4 жыл бұрын
Excellent, thank you.
@kajalkukreja694
@kajalkukreja694 3 жыл бұрын
Very good explanation👍👍
@BRiddles
@BRiddles 5 жыл бұрын
Dont you think in this case if last 2 goes down, all load will be on 1st 2 nodes.
@aleshep
@aleshep 4 жыл бұрын
What's the purpose of wearing a cap? Is this helps to explain hashing?
@vedant9173
@vedant9173 2 жыл бұрын
Brilliant explanation! So what happens if the node that was down comes back up? Will we have to remap the key that was moved to the first node? Or does it mean we would have to search all the nodes for a key?
@guidogranobles
@guidogranobles 2 жыл бұрын
Good question
@241praveen
@241praveen Жыл бұрын
what will happen if the location is getting added back in hashtable once the node are up again in distributed env? e.g 10115 got stored in 1011 as there was no location more than it available in hashtable. but suppose 10300 got added in hashtable then what will happen? will it remap all key values?
@chewoona7423
@chewoona7423 3 жыл бұрын
To find a bucket in Consistent Hashing, linear search is needed. Is it O(1)?
@hank91918
@hank91918 5 жыл бұрын
legendary content! thank you sir!
@ricardohincapie1537
@ricardohincapie1537 2 жыл бұрын
Clever! Thanks!
@mramit1924
@mramit1924 4 жыл бұрын
Gr8 content. Thank you
@prashanthtalla
@prashanthtalla 2 жыл бұрын
In case of consistent # ring, when a node is not available, how is the data retrieved? Also, when data is inserted, it will go to the next node. And when the non available node becomes available, how does the system knows where to find the data when queried? Wouldn't it look for the data in the now available node?
@shivaprasad.v.g7526
@shivaprasad.v.g7526 3 жыл бұрын
Its still not clear whats happens when a node which owns certain rows of the tables goes down and comes back up ?
@thorthegreat10
@thorthegreat10 5 жыл бұрын
How do we perform the correct bucket search in CH? I can think of some variation of binary search, but isn't it slower than direct lookup in a simple hashtable (O(logn) vs O(n))?
@TechDummiesNarendraL
@TechDummiesNarendraL 5 жыл бұрын
May be you can have a hashtable with hashrange and server mapping? (update this with hearbeat to all active servers?)
@thorthegreat10
@thorthegreat10 5 жыл бұрын
@@TechDummiesNarendraL what is hash range? Say I have 5 backets in a map, key value space of 5000 and 50 keys ranging from 0-100, 101-200 etc. On get I got key that hashes to 356 - how am I supposed to find that it's a 4th backet? Mark every possible value from range to that one backet, leading to a separate hashmap for keys of size 5000?
@praveensharma4014
@praveensharma4014 5 жыл бұрын
@@thorthegreat10 @martin Correct bucket/slot will be found by performing a binary search on the array of bucket numbers {0, 100, 200, ..., 5000}
@mohammedsamsuddinj8104
@mohammedsamsuddinj8104 4 жыл бұрын
Good one brother.. Thank you ..
@ashishpandey9698
@ashishpandey9698 5 жыл бұрын
Please add elevator system design. I didn't find good system design on the elevator. Or you share ant good link??. It's really help please do it
@tomtran6936
@tomtran6936 5 жыл бұрын
Hi, with Consistent hash ring, the fact that we need to loop through the key to find the one that is larger than hash value, makes this is not looking up with O(1) anymore but instead O(n), right?
@TechDummiesNarendraL
@TechDummiesNarendraL 5 жыл бұрын
Do you always need to search? No. why can't you have a mapper hash map?
@MsJackyjan
@MsJackyjan 3 жыл бұрын
Well Explained. Thanks.
@sandeep9606
@sandeep9606 5 жыл бұрын
I did not get how can we retrieve value if not storing key/value pair in consistence hashing. In this case storing only hai-max then how do get(hey) and get(dog) works. Both are at same bucket location. Please explain if i am missing anything
@neelabhsingh1986
@neelabhsingh1986 4 жыл бұрын
Hi Narendra, I have some confusion at 18:15, suppose Pair (Rat, Grt) whose hash# 9015 is mapped at bucket #9900. However, due to issue bucket, #9900 is down, If we do mapping again Pair (Rat, Grt), it will give the same hash# 9015, because bucket #9900 is down, it will be mapped to bucket #1011, which is the first bucket. So my question is what happens if bucket #9900 is online, now if we try to get Pair (Rat, Grt) whose hash# 9015 will try to locate on Bucket #9900, and finds that not available so return null, however, this Pair (Rat, Grt) is available on bucket #1011. So how this consistent mapping is helping on this. Waiting for your reply. Thank for your nice tutorial. Regards Neelabh Singh
@asdfffadff
@asdfffadff 3 жыл бұрын
very good explanation!! thank you
@madhurgwa
@madhurgwa 5 жыл бұрын
So, the scenario is, if we try to save any object with hash greater than 9900, say '9950' when 9900 is down then it (9950) will be saved at 1011 and whenever we try to fetch the object it will be available. But, if the location 9900 comes up and then we are trying to find the 9950 our logic will hit 9900 and return with nothing, so how this will be handled.
@TechDummiesNarendraL
@TechDummiesNarendraL 5 жыл бұрын
Consistent hashing is mostly used in Caching or Load balancing or NOSQL. Is case of Caching yes, It will get nothing, and duplicate cache happens(since its cache its fine) In case of load balancers you never save anything. In case of NOSQL, using gossip messages all nodes will get to know the 9900 node came back and they sync back the data from 1011 node.
@madhurgwa
@madhurgwa 5 жыл бұрын
@@TechDummiesNarendraL thanks for the reply Narendra. I was mainly thinking about if we implement something similar for any database then we need to take care of sync and all like Cassandra or any other nosql db does. Btw It was very simple and clear explanation of consistent hashing.👍
@raj_kundalia
@raj_kundalia 3 жыл бұрын
Thank you for the explanation.
@CHIRANJIBNANDY1
@CHIRANJIBNANDY1 3 жыл бұрын
I finally now understand it.
@gauravanand6937
@gauravanand6937 5 жыл бұрын
what is we want to retrieve the value from the unavailable node? how consistent hashing solves that issue?
@TechDummiesNarendraL
@TechDummiesNarendraL 5 жыл бұрын
@gaurav for example consistent hashing is used in Cassandra/load balancer/caching(CDN) like system. Where data is expected to be lost because of hardware failure. Hence you have to have data replicated in case of databases. But in case of caching, LB or CDN you don't need to as data will be populated back from the source.
@at_tap
@at_tap 5 жыл бұрын
If data loss is accepted, why not in traditional hashing store the number with which you hash the data?
@kgurumurthybhat
@kgurumurthybhat 5 жыл бұрын
@@at_tap With Regular hashing, you are affecting all memory location due to one server failure, whereas with Consistent hash only those reside in that servers are affected !
@Aliaksei_bus
@Aliaksei_bus 3 ай бұрын
good example, thank you
@gauravkathuria1920
@gauravkathuria1920 3 жыл бұрын
Hey , What if while inserting a key, some locations were not available and due to hash ring it goes to next location (circular way) . What will happen when those locations comes back and i am looking for the key I inserted ( When those locations were down ).Will not it give me the wrong answer ?
@bobreselman5731
@bobreselman5731 3 жыл бұрын
This is amazing!
@AmolGautam
@AmolGautam 6 ай бұрын
explained better than my college professor
@raveendrajonna4756
@raveendrajonna4756 5 жыл бұрын
Thanks for video, Can you do a video on "Debugger" System Design.
@gonkula
@gonkula 4 жыл бұрын
What do you mean by "Debugger" system design?
@shashikantgautam1315
@shashikantgautam1315 3 жыл бұрын
Great Explanation
@gagangupta1255
@gagangupta1255 3 жыл бұрын
Great tutorial
@montenegrodrd
@montenegrodrd 4 жыл бұрын
Great job.
@navderm
@navderm 5 жыл бұрын
12:28 : Consistent Hash
@rajivjha123
@rajivjha123 5 жыл бұрын
can you or somebody explain the black box here which is hash function ? How is the number generated or regenerated are same ?
@TechDummiesNarendraL
@TechDummiesNarendraL 5 жыл бұрын
Pls refer dzone.com/articles/decoded-examples-of-how-hashing-algorithms-work
@PrateekMehtaABDFAN
@PrateekMehtaABDFAN 2 жыл бұрын
Thank you sir , huge fan of your videos . Superb content . Quick question:Complexity will be increased now with consistent hashing rt ? Earlier it was O(1) now it will be logn . Correct me sir If I am wrong ?
@rahulsaxena2273
@rahulsaxena2273 2 жыл бұрын
At 12:01 when he is saying that we get wrong value. How we get wrong value because with equals key will not match so still it will return null. This same problem will occur in consistent hashing as well.
@amritraj6775
@amritraj6775 4 жыл бұрын
How it is O(1). we have to search in keys to find a fit that's O(n)
@BHARATKUMAR-le6eq
@BHARATKUMAR-le6eq 5 жыл бұрын
Hi, Sir instead of consistent hashing we also can use range. example range (1, 1000) store in key 1 and (1001, 2000) store in key 2 and any disadvantage of consistent hashing?
@TechDummiesNarendraL
@TechDummiesNarendraL 5 жыл бұрын
under the hood that's what happens, but how do you handle when a node is down? you have to reallocate the range.
@BHARATKUMAR-le6eq
@BHARATKUMAR-le6eq 5 жыл бұрын
@@TechDummiesNarendraL when a node is down then down node data distributed to another node which was not down or makes a copy of every node. So when any node down then this can be replaced down node.
Twitter system design | twitter Software architecture | twitter interview questions
36:56
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15
Incredible magic 🤯✨
00:53
America's Got Talent
Рет қаралды 81 МЛН
Каха и суп
00:39
К-Media
Рет қаралды 6 МЛН
Consistent Hashing - System Design Interview
11:42
High-Performance Programming
Рет қаралды 14 М.
A Brief Introduction to Consistent Hashing
7:55
H Barton
Рет қаралды 80 М.
Amazon System Design Interview: Design Parking Garage
29:59
Exponent
Рет қаралды 1,4 МЛН
Consistent Hashing | Algorithms You Should Know #1
8:04
ByteByteGo
Рет қаралды 291 М.
System Design Interview - Distributed Cache
34:34
System Design Interview
Рет қаралды 352 М.
How I Mastered System Design Interviews
10:22
Ashish Pratap Singh
Рет қаралды 124 М.
NETFLIX System design | software architecture for netflix
51:26
Tech Dummies Narendra L
Рет қаралды 425 М.
ГОСЗАКУПОЧНЫЙ ПК за 10 тысяч рублей
36:28
Ремонтяш
Рет қаралды 468 М.
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 8 МЛН
Здесь упор в процессор
18:02
Рома, Просто Рома
Рет қаралды 371 М.