简体   繁体   English

如何使用 Apache Httpd 为 ws 平衡器配置 http uri 健康检查

[英]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.

相关问题 如何将Apache Httpd正确配置为Load Balancer,其中某些主机可能不可用 - How to properly configure Apache Httpd as Load Balancer where some hosts may be unavailable 使用Apache HTTPD的负载均衡器 - Load Balancer with Apache HTTPD Apache HTTPD ProxyRemote和Balancer? - Apache HTTPD ProxyRemote and Balancer? 如何在Apache httpd中强制刷新HTTP标头? - How to forcefully flush HTTP headers in Apache httpd? Apache httpd 服务器不接受来自 F5 负载均衡器的 GET HTTP 请求 - Apache httpd server doesn't accept GET HTTP request from F5 load balancer 使用Apache httpd,如何为给定的UserAgent配置无缓存? - With Apache httpd, how do I configure no caching for a given UserAgent? Google负载均衡器与httpd apache负载均衡器 - Google Load balancer vs httpd apache load balancer 如果HTTPd是可运行的程序,那么Apache HTTP Server的官方站点怎么是“ httpd.apache.org”? - How come Official Site of Apache HTTP Server is 'httpd.apache.org', if HTTPd is a runnable program? 如何使用Apache httpd将文件内容放入http请求标头 - How to put file content to http request header by using Apache httpd 如何防止Apache httpd(MAMP)中的http文件缓存 - How to prevent http file caching in Apache httpd (MAMP)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM