CS6650 Building Scalable Distributed Systems
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?
Simple: Write a showRing() function for the ConsistentHashRouter class that prints out the list of virtual nodes and their mappings to physical nodes
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?