【发布时间】:2016-07-05 09:56:00
【问题描述】:
我关注了来自 Stuart Douglas video 的 these instructions 以使 Wildfly 能够在不需要 apache + mod_cluster 的情况下平衡请求,该功能自 Wildfly 9 起提供。
效果和视频中一样。但后来,我没有将第三台后端服务器添加到同一主机,而是创建了另一台主机并将 backend3 服务器添加到其中,该服务器也添加到了 backend-servers 组。
所以我有以下布局:
服务器一(主机控制器和负载平衡器):
- 后端1
- 后端2
服务器二(从):
- 后端3
我将第二台主机作为从机启动,我可以使用它的 ip 和 backend3 端口访问集群演示。此外,主机控制器能够注册从机:
[Host Controller] 10:05:52,198 INFO [org.jboss.as.domain.controller] (Host Controller Service Threads - 56) WFLYHC0019: Registered remote slave host "srv217", JBoss WildFly Full 10.0.0.Final (WildFly 2.0.10.Final)
但是,当我访问主服务器时,负载仍然只平衡到后端 1 和后端 2。 我试图停止两者,只让 backend3 启动,但后来我无法通过负载均衡器访问 clustering-demo。
有人知道负载平衡器是否需要额外的配置才能与从属主机一起工作?
编辑:
我正在添加我的主机控制器和从属日志。
主机控制器:http://pastebin.com/nyaDiPzS 奴隶:http://pastebin.com/kMS72E4U
这些台词引起了我的注意:
[Server:backend2] 08:56:58,956 INFO [org.infinispan.CLUSTER] (remote-thread--p7-t1) ISPN000310: Starting cluster-wide rebalance for cache clustering-demo.war, topology CacheTopology{id=1, rebalanceId=1, currentCH=DefaultConsistentHash{ns=80, owners = (1)[master:backend2: 80+0]}, pendingCH=DefaultConsistentHash{ns=80, owners = (2)[master:backend2: 40+40, master:backend1: 40+40]}, unionCH=null, actualMembers=[master:backend2, master:backend1]}
[Server:backend2] 08:56:59,023 INFO [org.infinispan.CLUSTER] (remote-thread--p7-t1) ISPN000310: Starting cluster-wide rebalance for cache routing, topology CacheTopology{id=1, rebalanceId=1, currentCH=DefaultConsistentHash{ns=80, owners = (1)[master:backend2: 80+0]}, pendingCH=DefaultConsistentHash{ns=80, owners = (2)[master:backend2: 40+40, master:backend1: 40+40]}, unionCH=null, actualMembers=[master:backend2, master:backend1]}
[Server:backend2] 08:56:59,376 INFO [org.infinispan.CLUSTER] (remote-thread--p7-t2) ISPN000336: Finished cluster-wide rebalance for cache clustering-demo.war, topology id = 1
似乎确认没有检测到slave:backend3。
【问题讨论】:
标签: load-balancing wildfly mod-cluster wildfly-10