RSS Amplifier

Recent Questions - Software Engineering Stack Exchange · Jul 21, 2026

Clarification on consistent hashing with virtual nodes with database failure example

0
Sign in to vote or save

This page did not load. You can still read it on the original site — the toolbar below keeps your place in the directory.

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…

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...

Hash ring of the example

  1. 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
  1. Does DB2, the physical node at position 25, now have all its keys go to the DB3 virtual node at position 30?

  2. 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?

Read on softwareengineering.stackexchange.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.