haproxy参数

BACKEND

inter相关参数

inter <delay>
fastinter <delay>
downinter <delay>

The "inter" parameter sets the interval between two consecutive health checks to <delay> milliseconds. If left unspecified, the delay defaults to 2000 ms. It is also possible to use "fastinter" and "downinter" to optimize delays between checks depending on the server state

inter参数设置用户两个连续的health check的时间间隔,即延时<delay> ms,如果不设置,默认的inter参数是2000ms,也可以根据服务器的状态使用fastinter 和downinter去优化探测延时

Server state Interval used
UP 100% (non-transitional) "inter"
Transitionally UP (going down "fall"),Transitionally DOWN (going up "rise"),or yet unchecked. "fastinter" if set,"inter" otherwise.
DOWN 100% (non-transitional) "downinter" if set,"inter" otherwise.

以上表格含义:
当服务器是up状态,无改变时,使用inter参数设置health check的延时去进行探测
当服务器状态有变化时,如从up->down;以及从down->up时,如果设置了fastinter就会使用fastinter的参数去进行health check,否则使用inter参数
当服务器是down时,可以使用downinter参数,来设置down掉后的探测时间间隔

Just as with every other time-based parameter, they can be entered in any other explicit unit among { us, ms, s, m, h, d }. The "inter" parameter also serves as a timeout for health checks sent to servers if "timeout check" is not set. In order to reduce "resonance" effects when multiple servers are hosted on the same hardware, the agent and health checks of all servers are started with a small time offset between them. It is also possible to
add some random noise in the agent and health checks interval using the global "spread-checks" keyword. This makes sense for instance when a lot of backends use the same servers.
Supported in default-server: Yes

像其他任何基于时间的参数一样,inter也可以输入任何明确的单位,(如us,ms,s,m,h,d),inter 参数也可以使用到timeout检测中,前提是配置了timeout check;当多个server在同一个物理硬件上,为了减少“共鸣”影响,health check的开始时间会有一个小小的时间的偏移。也可以使用“spread-check”给两次的health check的时间间隔增加一些随机时间,这个在多个backend使用的server相同是可以起到很大的作用

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,812评论 0 10
  • This document provides real world examples with working c...
    devabel阅读 759评论 0 0
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 136,488评论 19 139
  • 如果想要拉伸一个图片,直接拉伸的话,图片有透明的区域会拉伸变形,需要设置保护的区域方法可以分为两种通过代码 在As...
    哔哩哔哩智能喵阅读 908评论 0 0
  • 没有记录就没有发生,上周自己设定的目标基本完成,在跑步这块有了较大的突破。运动的安全相较于成绩大幅提升更为...
    高山的孔雀阅读 227评论 0 0

友情链接更多精彩内容