我已启用 HTTPD LoadBalancer Manager:
<location "/balancer-manager">
SetHandler balancer-manager
allow from all
</location>
但是当我访问 HTTP 接口时,我可以看到节点是重复的,我的意思是,如果平衡器有 3 个节点,我会看到 6 个条目......为什么会发生这种情况?
> Load Balancer Manager for 172.29.164.174
Server Version: Apache/2.2.15 (Unix) DAV/2
Server Built: Mar 3 2015 12:06:14
LoadBalancer Status for balancer://rws
StickySession Timeout FailoverAttempts Method
ROUTEID 0 5 byrequests
Worker URL Route RouteRedir Factor Set Status Elected To From
http://172.29.164.172:8080 RWS_Node_Ol_1 1 0 Init Ok 52476 73M 393M
http://172.29.164.173:8080 RWS_Node_Ol_2 1 0 Init Ok 52476 74M 391M
http://172.29.164.174:8080 RWS_Node_Ol_3 1 0 Init Ok 52476 74M 409M
http://172.29.164.172:8080 RWS_Node_Ol_1 1 0 Init Ok 52476 73M 393M
http://172.29.164.173:8080 RWS_Node_Ol_2 1 0 Init Ok 52476 74M 391M
http://172.29.164.174:8080 RWS_Node_Ol_3 1 0 Init Ok 52476 74M 409M
这是我的LB配置
<Proxy balancer://rws>
BalancerMember http://172.29.164.172:8080 route=RWS_Node_Ol_1
BalancerMember http://172.29.164.173:8080 route=RWS_Node_Ol_2
BalancerMember http://172.29.164.174:8080 route=RWS_Node_Ol_3
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
ProxySet stickysession=ROUTEID
</Proxy>
ProxyPass /api balancer://rws/api
ProxyPass /internal-api balancer://rws/internal-api
答案1
好吧...我的问题是一个聪明的人在conf.d文件夹中留下了2个扩展名为conf的配置文件...更改了扩展名并修复了