mirror of
https://github.com/status-im/consul.git
synced 2025-02-24 03:18:26 +00:00
Turns of intent queue warnings and enables dynamic queue sizing.
This commit is contained in:
parent
bcc9aea18f
commit
5065f3d82e
@ -376,6 +376,21 @@ func (c *Config) CheckACL() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SerfDefaultConfig returns a Consul-flavored Serf default configuration,
|
||||
// suitable as a basis for a LAN, WAN, segment, or area.
|
||||
func SerfDefaultConfig() *serf.Config {
|
||||
base := serf.DefaultConfig()
|
||||
|
||||
// This effectively disables the annoying queue depth warnings.
|
||||
base.QueueDepthWarning = 1000000
|
||||
|
||||
// This enables dynamic sizing of the message queue depth based on the
|
||||
// cluster size.
|
||||
base.MinQueueDepth = 4096
|
||||
|
||||
return base
|
||||
}
|
||||
|
||||
// DefaultConfig returns a sane default configuration.
|
||||
func DefaultConfig() *Config {
|
||||
hostname, err := os.Hostname()
|
||||
@ -389,8 +404,8 @@ func DefaultConfig() *Config {
|
||||
NodeName: hostname,
|
||||
RPCAddr: DefaultRPCAddr,
|
||||
RaftConfig: raft.DefaultConfig(),
|
||||
SerfLANConfig: serf.DefaultConfig(),
|
||||
SerfWANConfig: serf.DefaultConfig(),
|
||||
SerfLANConfig: SerfDefaultConfig(),
|
||||
SerfWANConfig: SerfDefaultConfig(),
|
||||
SerfFloodInterval: 60 * time.Second,
|
||||
ReconcileInterval: 60 * time.Second,
|
||||
ProtocolVersion: ProtocolVersion2Compatible,
|
||||
|
Loading…
x
Reference in New Issue
Block a user