1
0
Fork 0

Reduce Raft threshold to 2048

This can now go lower, since Raft snapshotting is more efficient. The
upside is that few logs will need be replayed when a node restarts,
which will result in shorter startup times. We may be able to go even
lower -- Consul defaults to 1024.

The downside is more Snapshotting, which pauses the system during that
time. But the pause times should be very short.
master
Philip O'Toole 10 months ago
parent 332e80fcb4
commit b674d1a829

@ -457,7 +457,7 @@ func ParseFlags(name, desc string, build *BuildInfo) (*Config, error) {
flag.DurationVar(&config.RaftHeartbeatTimeout, "raft-timeout", time.Second, "Raft heartbeat timeout")
flag.DurationVar(&config.RaftElectionTimeout, "raft-election-timeout", time.Second, "Raft election timeout")
flag.DurationVar(&config.RaftApplyTimeout, "raft-apply-timeout", 10*time.Second, "Raft apply timeout")
flag.Uint64Var(&config.RaftSnapThreshold, "raft-snap", 8192, "Number of outstanding log entries that trigger snapshot and Raft log compaction")
flag.Uint64Var(&config.RaftSnapThreshold, "raft-snap", 2048, "Number of outstanding log entries that trigger snapshot and Raft log compaction")
flag.DurationVar(&config.RaftSnapInterval, "raft-snap-int", 30*time.Second, "Snapshot threshold check interval")
flag.DurationVar(&config.RaftLeaderLeaseTimeout, "raft-leader-lease-timeout", 0, "Raft leader lease timeout. Use 0s for Raft default")
flag.BoolVar(&config.RaftStepdownOnShutdown, "raft-shutdown-stepdown", true, "If leader, stepdown before shutting down. Enabled by default")

Loading…
Cancel
Save