You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TarantoolBot opened this issue
Aug 3, 2021
· 0 comments
· Fixed by #2848
Assignees
Labels
ecosystem[area] Task relates to Tarantool's ecosystem (connector, module, other non-server functionality)featureA new functionalityvshard[area] Related to vshard module
Router used not to be able to find master nodes in the configured
replicasets on its own. It relied only on how they were specified
in the config.
This becomes a problem when master changes and the change is not
delivered to the router's config somewhy. For instance, the router
does not rely on a central config provider. Or it does rely, but
the provider can't deliver a new config due to any reason.
This is getting especially tricky with built-in automatic master
elections which are not supported by vshard yet, but they will be,
they won't depend on any config. Master role won't be pinned to
one node then.
Now there is a new feature to overcome the master search problem -
configurable automatic master discovery on the router.
Router goes to the replicasets, marked as having an auto master,
finds a master in them, and periodically checks if the master is
still a master.
When a master in a replicaset stops being a master, the router
walks all nodes of the replicaset and finds who is the new master.
To turn the feature on there is a new option in router's config: master = 'auto'. It should be specified per-replicaset, and is
not compatible with specifying a master manually.
It will not work, because either master = 'auto' can be
specified, or the master is assigned manually. Not both at the
same time.
Master discovery works in its own fiber on the router, which is
activated only if at least one replicaset is configured to look
for the master. It wakes up with a certain period. But it is
possible to wake it up on demand using vshard.router.master_search_wakeup() function. It does not do
anything if master search is not configured for any replicaset.
veod32
added
ecosystem
[area] Task relates to Tarantool's ecosystem (connector, module, other non-server functionality)
vshard
[area] Related to vshard module
feature
A new functionality
labels
Aug 27, 2021
veod32
changed the title
VShard router master discovery
[5pt] VShard router master discovery
Sep 1, 2021
ecosystem[area] Task relates to Tarantool's ecosystem (connector, module, other non-server functionality)featureA new functionalityvshard[area] Related to vshard module
Uh oh!
There was an error while loading. Please reload this page.
Epic: Document master discovery
Related dev issue: tarantool/vshard#75
See also tarantool/vshard@551b106
Product: Tarantool
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_rock/vshard/
SME: @ Gerold103
Details
Router used not to be able to find master nodes in the configured
replicasets on its own. It relied only on how they were specified
in the config.
This becomes a problem when master changes and the change is not
delivered to the router's config somewhy. For instance, the router
does not rely on a central config provider. Or it does rely, but
the provider can't deliver a new config due to any reason.
This is getting especially tricky with built-in automatic master
elections which are not supported by vshard yet, but they will be,
they won't depend on any config. Master role won't be pinned to
one node then.
Now there is a new feature to overcome the master search problem -
configurable automatic master discovery on the router.
Router goes to the replicasets, marked as having an auto master,
finds a master in them, and periodically checks if the master is
still a master.
When a master in a replicaset stops being a master, the router
walks all nodes of the replicaset and finds who is the new master.
To turn the feature on there is a new option in router's config:
master = 'auto'
. It should be specified per-replicaset, and isnot compatible with specifying a master manually.
This is how a good config looks:
This is how a bad config looks:
It will not work, because either
master = 'auto'
can bespecified, or the master is assigned manually. Not both at the
same time.
Master discovery works in its own fiber on the router, which is
activated only if at least one replicaset is configured to look
for the master. It wakes up with a certain period. But it is
possible to wake it up on demand using
vshard.router.master_search_wakeup()
function. It does not doanything if master search is not configured for any replicaset.
Requested by @Gerold103 in tarantool/vshard@27b0f3b.
The text was updated successfully, but these errors were encountered: