- 论坛徽章:
- 0
|
我们Haproxy刚好接到一个需求,是配置泛解析。
所以主要配置就是
acl ttpai_cn hdr_end(host) ttpai.cn
acl pinpoint hdr(host) -f /opt/config/haproxy/vhost/host 这个是我们pinpoint监控所用的虚拟机,其中host文件中只包含了5个以ttpai.cn结束的域名
use_backend normal if ttpai_cn
use_backend monitor if pinpoint
按照这个配置后,发现pinpoint所监控的几台包含ttpai.cn域名的机器已经没有访问数据了,说明没有路由到pinpoint
后来把
use_backend normal if ttpai_cn
use_backend monitor if pinpoint
修改为
use_backend monitor if pinpoint
use_backend normal if ttpai_cn
这样reload haproxy后,就正常了,在google上也搜到类似一个案例。但是回答也没说明为什么use_backend会有配置文件中的顺序问题。
求解答 |
|