Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a virtual node to vdc hashmap for consistent hashing #4

Open
marrotte opened this issue Feb 25, 2017 · 0 comments
Open

Add a virtual node to vdc hashmap for consistent hashing #4

marrotte opened this issue Feb 25, 2017 · 0 comments

Comments

@marrotte
Copy link

marrotte commented Feb 25, 2017

Currently, the geoppinning algorithm is fixed on the number of vdc, hence mod #vdc. This makes scaling harder and harder as the number of vdc increase. By implementing consistent hash, hence an intermediary hashmap, mapping virtual nodes to vdc, the impact from scaling can be minimized, much more manageable and provide much more flexibility. For example, for a 3-site vdc we can start with 4096 vnodes indexed uniformly with vdc numbers 0-2. The geopinning algorithm would fix it's mod operation on 4096 vs 3. As we scale up and add more vdc, we simply adjust our vnode to vdc hashmap as desired -- that is, most likely preserving uniformity and minimizing data migration, but not necessarily. This can even be made backward compatible with existing geopin code/deployments by configuring the hashmap appropriately, e.g. {0-4095}%4096 to {0-4095}%3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant