Merge pull request #515 from thaJeztah/18.03-backport-election
[18.03] Increase raft ElectionTick to 10xHeartbeatTick
This commit is contained in:
@@ -122,10 +122,13 @@ func (n *nodeRunner) start(conf nodeStartConfig) error {
|
||||
JoinToken: conf.joinToken,
|
||||
Executor: container.NewExecutor(n.cluster.config.Backend, n.cluster.config.PluginBackend),
|
||||
HeartbeatTick: 1,
|
||||
ElectionTick: 3,
|
||||
UnlockKey: conf.lockKey,
|
||||
AutoLockManagers: conf.autolock,
|
||||
PluginGetter: n.cluster.config.Backend.PluginGetter(),
|
||||
// Recommended value in etcd/raft is 10 x (HeartbeatTick).
|
||||
// Lower values were seen to have caused instability because of
|
||||
// frequent leader elections when running on flakey networks.
|
||||
ElectionTick: 10,
|
||||
UnlockKey: conf.lockKey,
|
||||
AutoLockManagers: conf.autolock,
|
||||
PluginGetter: n.cluster.config.Backend.PluginGetter(),
|
||||
}
|
||||
if conf.availability != "" {
|
||||
avail, ok := swarmapi.NodeSpec_Availability_value[strings.ToUpper(string(conf.availability))]
|
||||
|
||||
Reference in New Issue
Block a user