Lab 11: Consistent Hashing

CS6650 Building Scalable Distributed Systems

Lab 11: Consistent Hashing

Step 1:

Copy the code for consistent hashing from: https://github.com/Jaskey/ConsistentHash

Run the code and see if you can figure out how it works?

Step 2

Simple: Write a showRing() function for the ConsistentHashRouter class that prints out the list of virtual nodes and their mappings to physical nodes

Step 3

Tougher: generate eg 10K random strings and pass them to the consistentHashRouter. Record which physical node they get mapped to and on completion work out what the distribution of keys to physical nodes was? Does varying the number of vNodes (10 in this code) lead to different distributions?

Back to Course Home Page