I was confused about the explanation of the example provided in this article on Hellointerview based on the labelling of the virtual nodes (dotted circles).
The explanation provided for Database 2 (DB2):
Now when Database 2 fails:
The events that were mapped to "DB2-vn1" will be redistributed to Database 1
The events that were mapped to "DB2-vn2" will go to Database 3
The events that were mapped to "DB2-vn3" will go to Database 4
And so on...
- Is it correct to assume the following?
- DB2-vn1 is at position 15
- DB2-vn2 is at position 40
- DB2-vn3 is at position 55
Does DB2, the physical node at position 25, now have all its keys go to the DB3 virtual node at position 30?
In case of the failure, does consistent hashing only work with new keys? How is all the data that was in DB2 recovered and added to the other databases?


Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.