最近在网站的一次较大的代码更新后,突然主页无法打开,但是直接访问内部服务器是可以打开的,第一反应就是F5的健康检查问题,查看F5后发现web_pool 显示down了,立即把原先自定义的基于内容的http monitor改为TCP monitor,web_pool 立即UP了。
查看原先的自定义的http monitor是 GET /index.html,查看返回的是否带有abc.com(网站域名)字符串,难道代码更新把abc.com都更新掉了?用http watch查看最新的index.html,发现仍然可以找到很多abc.com,那为什么F5却不认呢?
通过搜索ask.f5.com终于找到了答案,
SOL3451: Content length limits for HTTP and HTTPS health monitors
An HTTP health monitor reads up to 5,120 bytes into HTTP data. If the monitor cannot find a match to the configured search string within the first 5,120 bytes, the BIG-IP LTM marks the node as down.
http 健康检查只会读取5120个字节的数据,如果monitor无法在起始的5120的字节的内容中找到配置的字符串,LTM就会把node标记为down
原来这次更新代码把abc.com这个字符串更新到5120个字节之后所以monitor无法读取到,然后再自己测试一下,果然是这样的,所以以后要用到自定义的http monitor取较大的页面时,要注意到这个细节。