Hi,
I'm trying to use the auto-rebalance mode in Helix.
The use case is the following (standard leader-standby scenario, a bit like the
rsync example in the helix codebase):
- the dataspace is partitioned
- for a given partition, we have
- a leader that is responsible for writing and serving data, logging
operations into a journal
- a replica that fetches updates from a journal and applies them
locally but it does not serve data
Upon failure, the replica becomes leader, applies pending updates and can write
and serve data. Ideally we also get a new replica assigned.
We'd like to use the auto_rebalance mode in Helix so that partitions are
automatically assigned and re-assigned, and so that leaders are automatically
elected.
Unfortunately, I can't really get the balancing right. I might be doing
something wrong, so I uploaded an example here :
https://github.com/matthieumorel/helix-balancing
In this application I would like to get exactly 1 leader and 1 replica for each
of the partitions
In this example we don't reach that result, and when removing a node, we even
get to a situation where there is no leader for a given partition.
Do I have wrong expectations? Is there something wrong with the code, is it
something with helix?
Thanks!
Matthieu