in Ceilometer we're using consistent hash rings to do workload
partitioning. We've considered generalizing your hash ring
implementation and moving it up to oslo, but unfortunately your
implementation is not actually consistent, which is our requirement.
Since you divide your ring into a number of equal sized partitions,
instead of hashing hosts onto the ring, when you add a new host,
an unbound amount of keys get re-mapped to different hosts (instead of
the 1/#nodes remapping guaranteed by hash ring). I've confirmed this
with the test in aforementioned patch.
If this is good enough for your use-case, great, otherwise we can get a
generalized hash ring implementation into oslo for use in both projects
or we can both use an external library.
OpenStack-dev mailing list