close
在 JBoss EAP6.x Standalone Mode Cluster Configuration 驗證了 Standalone Mode 的 Cluster 機制,在 Domain Mode 的設定也很簡單,還記得在 JBoss EAP6 Domain Mode Setup 中 host.xml 對每台 server 作了 port-offset ,而這就是 workers.properties 檔案裡的 node。
所以在 workers.properties 的設定如下:
# Define list of workers that will be used # for mapping requests worker.list=loadbalancer,status # Define Node1 # modify the host as your host IP or DNS name. worker.node1.port=8009 worker.node1.host=10.10.2.4 worker.node1.type=ajp13 worker.node1.ping_mode=A worker.node1.lbfactor=1 # Define Node2 # modify the host as your host IP or DNS name. worker.node2.port=8109 worker.node2.host=10.10.3.118 worker.node2.type=ajp13 worker.node2.ping_mode=A worker.node2.lbfactor=1 # Define Node3 # modify the host as your host IP or DNS name. worker.node3.port=8209 worker.node3.host=10.10.3.118 worker.node3.type=ajp13 worker.node3.ping_mode=A worker.node3.lbfactor=1 # Define Node4 # modify the host as your host IP or DNS name. worker.node4.port=8409 worker.node4.host=10.10.3.118 worker.node4.type=ajp13 worker.node4.ping_mode=A worker.node4.lbfactor=1 # Load-balancing behavior worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=node1,node2,node3,node4 worker.loadbalancer.sticky_session=0 # Status worker for managing load balancer worker.status.type=status |
啟動的順序是,先將 JBoss 開始後,再啟動 Apache 就可以了。
JBoss 的啟動指令 JBoss EAP6 Domain Mode Setup 裡的 Step04 & Step05 相同,不需修改。
文章標籤
全站熱搜
留言列表