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

vshard: rebalancer flag and mode #3865

Closed
TarantoolBot opened this issue Nov 17, 2023 · 0 comments · Fixed by #4155
Closed

vshard: rebalancer flag and mode #3865

TarantoolBot opened this issue Nov 17, 2023 · 0 comments · Fixed by #4155
Assignees
Labels
3.1 config vshard [area] Related to vshard module

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented Nov 17, 2023

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 with master = '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 if rebalancer_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 have rebalancer = 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
    one rebalancer = 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
    the rebalancer = true/false specified in the config.
    Requested by @ Gerold103 in tarantool/vshard@9fda354.

@andreyaksenov andreyaksenov self-assigned this Nov 23, 2023
@andreyaksenov andreyaksenov added the vshard [area] Related to vshard module label Nov 23, 2023
@andreyaksenov andreyaksenov removed their assignment Nov 30, 2023
@andreyaksenov andreyaksenov self-assigned this Feb 15, 2024
@andreyaksenov andreyaksenov linked a pull request Feb 15, 2024 that will close this issue
@andreyaksenov andreyaksenov added 3.1 and removed 3.0 labels Feb 16, 2024
@andreyaksenov andreyaksenov removed their assignment Feb 16, 2024
@andreyaksenov andreyaksenov removed a link to a pull request Feb 16, 2024
@andreyaksenov andreyaksenov self-assigned this Apr 15, 2024
@andreyaksenov andreyaksenov linked a pull request Apr 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.1 config vshard [area] Related to vshard module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants