9.2. 在 Microsoft Azure 中使用 mod_cluster 进行负载均衡的配置
由于 Azure 不支持 mod_cluster 广告,如果您要配置 JBoss EAP 负载平衡环境,您必须确保所有负载均衡器和 worker 都绑定到内部 Microsoft Azure 虚拟网络上可访问的 IP 地址。
注意
balancer 和 worker 必须绑定到实际的内部 Azure 虚拟 IP 地址,如 172.28.0.2,而不是 0.0.0.0。
此外,由于 mod_cluster 广告不可用,如果您使用 JBoss EAP 作为 Undertow mod_cluster 代理负载平衡器,您必须将每个 worker 节点配置为使用包含每个负载均衡器 IP 地址和端口的代理列表,如下所示:
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=proxy-one:add(host="BALANCER_IP_ADDRESS", port="BALANCER_PORT") /subsystem=modcluster/mod-cluster-config=configuration:list-add(name=proxies,value=proxy-one)
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=proxy-one:add(host="BALANCER_IP_ADDRESS", port="BALANCER_PORT")
/subsystem=modcluster/mod-cluster-config=configuration:list-add(name=proxies,value=proxy-one)