Description
Related dev. issue(s): tarantool/vshard#432
Product: Tarantool/vshard
Since: 3.1, 0.1.25
Root document: https://www.tarantool.io/en/doc/latest/book/admin/vshard_admin/#configuration
SME: @ Gerold103
Details
So far it was impossible to specify which instance should run the
rebalancer. It was always automatically assigned using some
internal rules based on UUIDs.
Now the users can choose:
- Which specific instance should run the rebalancer. Can be a
replica or a master - won't matter. - In which replicaset the instance to run the rebalancer should be
selected automatically. - Which instances and whole replicasets should not run the
rebalancer even when it is selected automatically.
For that there are 2 new options: rebalancer = <bool>
and
rebalancer_mode = <name>
.
The rebalancer
flag can be either omitted, or set to true, or
false. It can be set for replicasets and for specific instances.
There can be only one rebalancer = true
in the whole config. But
can be many rebalancer = false
.
-
rebalancer = true
assigned to an instance means that this
instance is guaranteed to run the rebalancer service on it.
The instance role doesn't matter - it can be a replica or a
master. Will run the rebalancer anyway. -
rebalancer = true
assigned to a replicaset means that the
service will run only on the master of this replicaset. Can be
combined withmaster = 'auto'
on the given replicaset. -
rebalancer = false
assigned to an instance means that it will
not run the rebalancer. -
rebalancer = false
assigned to a replicaset means that all the
instances of this replicaset will not run the rebalancer. -
rebalancer = nil
(same as omitted, default) means that the
instance/replicaset will be eligible to run the rebalancer
only ifrebalancer_mode = 'auto'
is set and there are no
rebalancer = true
anywhere.
The option rebalancer_mode
should be specified in the root of
the config. It can have one of those values:
-
'auto'
- default. Means that the rebalancer service location
is chosen automatically among all master instances in the
cluster. Excluding those which haverebalancer = false
on
them or on their replicaset. If there are any
rebalancer = true
, then this mode works the same as
'manual'
. -
'manual'
. The rebalancer will run only if there is at least
onerebalancer = true
in the config. And only on the given
instance / replicaset (depending on at which level the flag
was specified - for a specific instance or for a whole
replicaset). -
'off'
. The rebalancer will not run anywhere, regardless of all
therebalancer = true/false
specified in the config.
Requested by @ Gerold103 in tarantool/vshard@9fda354.