mirror of https://github.com/hashicorp/consul
Turns of intent queue warnings and enables dynamic queue sizing.
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…
Reference in New Issue