diff --git a/etc/config.sample.toml b/etc/config.sample.toml index 40d1304b9cb..12bd5a99842 100644 --- a/etc/config.sample.toml +++ b/etc/config.sample.toml @@ -83,7 +83,7 @@ max-segment-size = 10485760 # Raft configuration. Controls the distributed consensus system. [raft] apply-interval = "10ms" -election-timeout = "1s" +election-timeout = "5s" heartbeat-interval = "100ms" reconnect-timeout = "10ms" diff --git a/raft/clock.go b/raft/clock.go index 9b203c6f158..6e5a48e9b9f 100644 --- a/raft/clock.go +++ b/raft/clock.go @@ -10,7 +10,7 @@ const ( DefaultApplyInterval = 10 * time.Millisecond // DefaultElectionTimeout is the default time before starting an election. - DefaultElectionTimeout = 1 * time.Second + DefaultElectionTimeout = 5 * time.Second // DefaultHeartbeatInterval is the default time to wait between heartbeats. DefaultHeartbeatInterval = 100 * time.Millisecond