Consul中文中档—Consul性能调优参数

Consul-Logo
本文讲介绍下,Consul的性能调优参数

翻译自官网文档: https://www.consul.io/docs/agent/options#performance

转载请注明🙂,喜欢请一键三连哦😊


performance Available in Consul 0.7 and later, this is a nested object that allows tuning the performance of different subsystems in Consul. See the Server Performance documentation for more details. The following parameters are available:

performance参数在consul0.7及更高版本中可用,这是一个嵌套对象,允许在consul中调整不同子系统的性能。有关详细信息,请参阅服务器性能文档。以下参数可用:

例如:

{
  "performance": {
    "raft_multiplier": 1
  }
}

leave_drain_time 参数作用

A duration that a server will dwell during a graceful leave in order to allow requests to be retried against other Consul servers. Under normal circumstances, this can prevent clients from experiencing “no leader” errors when performing a rolling update of the Consul servers. This was added in Consul 1.0. Must be a duration value such as 10s. Defaults to 5s.

这个参数规定了 Server节点优雅退出的时间,允许在退出时间过来的请求,重试到其他Consul Server节点。在正常情况下,这可以防止客户端在执行consul服务器的滚动更新时遇到“no leader”错误。这是在concur 1.0中添加的。必须是持续时间值,如10s。默认为5s。

raft_multiplier 参数作用:

An integer multiplier used by Consul servers to scale key Raft timing parameters. Omitting this value or setting it to 0 uses default timing described below. Lower values are used to tighten timing and increase sensitivity while higher values relax timings and reduce sensitivity. Tuning this affects the time it takes Consul to detect leader failures and to perform leader elections, at the expense of requiring more network and CPU resources for better performance.

By default, Consul will use a lower-performance timing that’s suitable for minimal Consul servers, currently equivalent to setting this to a value of 5 (this default may be changed in future versions of Consul, depending if the target minimum server profile changes). Setting this to a value of 1 will configure Raft to its highest-performance mode, equivalent to the default timing of Consul prior to 0.7, and is recommended for production Consul servers.

See the note on last contact timing for more details on tuning this parameter. The maximum allowed value is 10.

Consul服务器用于缩放关键Raft时序参数的整数乘数。 忽略此值或将其设置为0会使用下面介绍的默认时序。 较低的值用于拉紧时序并增加灵敏度,而较高的值则用于放松时序并降低灵敏度。 进行此调整会影响Consul检测领导者故障和执行领导者选举所花费的时间,但需要更多的网络和CPU资源才能获得更好的性能。

默认情况下,consul将使用适合最小consul服务器的较低性能定时,当前相当于将其设置为5(在consul的未来版本中,此默认值可能会更改,具体取决于目标最低服务器配置文件的更改)。将此值设置为1将把Raft配置为其最高性能模式,相当于consul 0.7之前的默认计时,建议用于生产consul服务器。

有关调整此参数的更多详细信息,请参见last contact timing的注释。允许的最大值为10。

rpc_hold_timeout 参数作用

A duration that a client or server will retry internal RPC requests during leader elections. Under normal circumstances, this can prevent clients from experiencing “no leader” errors. This was added in Consul 1.0. Must be a duration value such as 10s. Defaults to 7s.

在此期间内, Server 或 Client 节点将会在Leader选举重试 RPC请求。 在正常情况下,这样可以防止客户端出现“No Leader” 错误。 此参数在Consul 1.0中添加的, 必须为持续时间值,例如10s。默认为7s。

参考文档

Consul Agent性能调优参数

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值