我在我的机器上的一个地窖组中有三个卡拉夫节点。第一个节点(lb_node
)用作load_balancer,其他两个节点(1_node
和2_node
)用作服务节点(具有部署的功能)。两个节点都有/service
地址可用。我已经在群集上安装了cellar-http-balancer
功能。另外,我在本地安装了样本功能1_node
和2_node
。
问题是,当我开始1_node
和2_node
他们的服务没有正确登记在lb_node
。从lb_node
http-list
输出:HA卡拉夫地窖集群
ID | Servlet | Servlet-Name | State | Alias | Url
103 | CellarBalancerProxyServlet | ServletModel-10 | Failed | /features | [/features/*]
103 | CellarBalancerProxyServlet | ServletModel-11 | Failed | /jolokia | [/jolokia/*]
103 | CellarBalancerProxyServlet | ServletModel-12 | Failed | /gogo | [/gogo/*]
103 | CellarBalancerProxyServlet | ServletModel-9 | Failed | /instance | [/instance/*]
103 | CellarBalancerProxyServlet | ServletModel-13 | Failed | /services | [/services/*]
103 | CellarBalancerProxyServlet | ServletModel-8 | Deployed | /jolokia | [/jolokia/*]
103 | CellarBalancerProxyServlet | ServletModel-14 | Failed | /system/console/res | [/system/console/res/*]
103 | CellarBalancerProxyServlet | ServletModel-15 | Failed | /system/console | [/system/console/*]
103 | CellarBalancerProxyServlet | ServletModel-3 | Deployed | /gogo | [/gogo/*]
103 | CellarBalancerProxyServlet | ServletModel-2 | Deployed | /instance | [/instance/*]
103 | CellarBalancerProxyServlet | ServletModel-7 | Deployed | /features | [/features/*]
103 | CellarBalancerProxyServlet | ServletModel-6 | Deployed | /services | [/services/*]
103 | CellarBalancerProxyServlet | ServletModel-5 | Deployed | /system/console | [/system/console/*]
103 | CellarBalancerProxyServlet | ServletModel-4 | Deployed | /system/console/res | [/system/console/res/*]
正如你可以看到只有一个节点的注册地址。当我在浏览器中输入lb_node
url来检查来自其他节点的功能是否有效时,它会执行此操作。但是当我关闭已注册的节点时,lb_node
将不再作为代理。它引发java.net.ConnectException: Connection refused
在教程https://karaf.apache.org/manual/cellar/latest-4/#_http_balancer有只有一个节点与服务和一个平衡器的情况下,这不是我的情况。
有没有什么办法通过使用卡拉夫和地窖实现http负载平衡的主动/主动群集?
可以downvoter写他为什么这样做? –