[英]how to configure http uri healthcheck for a ws balancer with Apache Httpd
i need to configure healthcheck for my ws load balancer within Apache httpd.我需要在 Apache httpd 中为我的 ws 负载均衡器配置健康检查。 i am using mod_proxy_wstunnel for websocket tunneling and mod_balancer for load balancing between 2 servers.我使用 mod_proxy_wstunnel 进行 websocket 隧道传输,使用 mod_balancer 在 2 个服务器之间进行负载平衡。 i am using additionnaly mod_proxy_hcheck for verifying if the 2 servers are available.我正在使用另外的 mod_proxy_hcheck 来验证 2 个服务器是否可用。 the configuration is following:配置如下:
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
ProxyHCExpr ok2 {%{REQUEST_STATUS} =~ /^[2]/}
<Proxy balancer://trackingwsbalancer>
BalancerMember wss://{{ rpa_fqdn_tracking1 }}:8443 route=1 hcmethod=GET hcexpr=ok2 hcuri=/trackingproxy_advanced/actuator
BalancerMember wss://{{ rpa_fqdn_tracking2 }}:8443 route=2 hcmethod=GET hcexpr=ok2 hcuri=/trackingproxy_advanced/actuator
ProxySet stickysession=ROUTEID
ProxySet lbmethod=bybusyness
</Proxy>
the problem is that the healthcheck always fails because the request behind is:问题是健康检查总是失败,因为背后的请求是:
wss ://{{ rpa_fqdn_tracking1 }}:8443/trackingproxy_advanced/actuator.
and i want it to be我希望它是
htpps ://{{ rpa_fqdn_tracking1 }}:8443/trackingproxy_advanced/actuator
in order to be able to handle the response for healthcheck correctly with hcexpr为了能够使用 hcepr 正确处理健康检查的响应
i will greatly appreciate any idea to configure the protocole for the uri healthcheck.我将不胜感激任何为 uri 健康检查配置协议的想法。
The documentation of the mod_proxy_hcheck module says that it performs a HTTP request. mod_proxy_hcheck 模块的文档说它执行 HTTP 请求。 After inspecting the mod_proxy_hcheck.c( Apche 2.4.39), it seems that this case is not covered.在检查了 mod_proxy_hcheck.c(Apche 2.4.39) 之后,似乎没有涵盖这种情况。 The code doesn't check if the scheme is ws and does not replace it when it create the request.代码不会检查方案是否为 ws 并且在创建请求时不会替换它。
It should be great to be able to add an absolute uri for the hckeck or replace automatically the protocol used if it's not http.能够为 hckeck 添加绝对 uri 或自动替换使用的协议(如果它不是 http)应该很棒。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.