From 98510f898ce340b190b1a74ba54fd5d7f74f23a3 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Mon, 26 Jun 2017 16:29:49 +0200 Subject: [PATCH] rpc: less agressive raft timeouts Allowing more time for raft to consolidate should drop the number of leader elections. --- agent/consul/server_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/agent/consul/server_test.go b/agent/consul/server_test.go index 0de99077e..c274226fc 100644 --- a/agent/consul/server_test.go +++ b/agent/consul/server_test.go @@ -72,11 +72,11 @@ func testServerConfig(t *testing.T) (string, *Config) { config.SerfWANConfig.MemberlistConfig.ProbeInterval = 100 * time.Millisecond config.SerfWANConfig.MemberlistConfig.GossipInterval = 100 * time.Millisecond - config.RaftConfig.LeaderLeaseTimeout = 20 * time.Millisecond - config.RaftConfig.HeartbeatTimeout = 40 * time.Millisecond - config.RaftConfig.ElectionTimeout = 40 * time.Millisecond + config.RaftConfig.LeaderLeaseTimeout = 100 * time.Millisecond + config.RaftConfig.HeartbeatTimeout = 200 * time.Millisecond + config.RaftConfig.ElectionTimeout = 200 * time.Millisecond - config.ReconcileInterval = 100 * time.Millisecond + config.ReconcileInterval = 300 * time.Millisecond config.AutopilotConfig.ServerStabilizationTime = 100 * time.Millisecond config.ServerHealthInterval = 50 * time.Millisecond