公司集群框架环境搭建及示例研究

场景1:集群中多个node提供service方法(如sayHello),客户端向集群发送请求,集群中只要有node提供服务即可。

请求由集群中哪个node响应由负载均衡策略决定。

时序图

对象图

扫描二维码关注公众号,回复: 1198172 查看本文章

附录:

1。SiteAdminServiceImpl类里HAServiceRegistry实例信息

{HAJNDI=HA Service :[
Service Id: HAJNDI, allowInvocationsStatus :2
Replicants :[
1::Service : HAJNDI , Restrict Provider : [ JBOSS Identity
address:dbp/192.168.123.154
instanceid:IDXSERVER1
JMX id:dbp_1338539640894
domain:WXXR
, site name: LUCENEserving partition :LUCENE ] , Route Table :[
Service Route Table:[
1:LOCAL ENTRY, Provider :HARMIServerImpl_Stub[UnicastRef2 [liveRef: [endpoint:[192.168.123.154:1201,org.jboss.net.sockets.DefaultSocketFactory@24af8c1c[bindAddress=/192.168.123.154]](local),objID:[-298b356e:137a72e08c0:-7ffb, -4835884582682409480]]]]
]]
], com.wxxr.security.ISiteKeyDistributor=HA Service :[
Service Id: com.wxxr.security.ISiteKeyDistributor, allowInvocationsStatus :2
Replicants :[
1::Service : com.wxxr.security.ISiteKeyDistributor , Provider : [ JBOSS Identity
address:dbp/192.168.123.154
instanceid:IDXSERVER1
JMX id:dbp_1338539640894
domain:WXXR
, site name: LUCENE ] , Route Table :[
Service Route Table:[
1:LOCAL ENTRY, Provider :wxxr:service=SiteSecurityService
]]
2::Service : com.wxxr.security.ISiteKeyDistributor , Provider : [ JBOSS Identity
address:dbp/192.168.123.154
instanceid:IDXSERVER0
JMX id:dbp_1338539640852
domain:WXXR
, site name: LUCENE ] , Route Table :[
Service Route Table:[
1:Service Route Entry : [Next Hop Partition:LUCENE , Next Hop Node:Node[lucene-server-00], distance :1]
]]
], com.wxxr.common.management.LoggingManagement=HA Service :[
Service Id: com.wxxr.common.management.LoggingManagement, allowInvocationsStatus :2
Replicants :[
1::Service : com.wxxr.common.management.LoggingManagement , Provider : [ JBOSS Identity
address:dbp/192.168.123.154
instanceid:IDXSERVER1
JMX id:dbp_1338539640894
domain:WXXR
, site name: LUCENE ] , Route Table :[
Service Route Table:[
1:LOCAL ENTRY, Provider :wxxr:service=LoggingManagement
]]
2::Service : com.wxxr.common.management.LoggingManagement , Provider : [ JBOSS Identity
address:dbp/192.168.123.154
instanceid:IDXSERVER0
JMX id:dbp_1338539640852
domain:WXXR
, site name: LUCENE ] , Route Table :[
Service Route Table:[
1:Service Route Entry : [Next Hop Partition:LUCENE , Next Hop Node:Node[lucene-server-00], distance :1]
]]
], com.wxxr.tutorial.cluster.IHelloWorld=HA Service :[
Service Id: com.wxxr.tutorial.cluster.IHelloWorld, allowInvocationsStatus :2
Replicants :[
1::Service : com.wxxr.tutorial.cluster.IHelloWorld , Provider : [ JBOSS Identity
address:dbp/192.168.123.154
instanceid:IDXSERVER1
JMX id:dbp_1338539640894
domain:WXXR
, site name: LUCENE ] , Route Table :[
Service Route Table:[
1:LOCAL ENTRY, Provider :com.wxxr.common.jboss.ServiceMBeanAOPInvocationHandler@1b0ba02
]]
2::Service : com.wxxr.tutorial.cluster.IHelloWorld , Provider : [ JBOSS Identity
address:dbp/192.168.123.154
instanceid:IDXSERVER0
JMX id:dbp_1338539640852
domain:WXXR
, site name: LUCENE ] , Route Table :[
Service Route Table:[
1:Service Route Entry : [Next Hop Partition:LUCENE , Next Hop Node:Node[lucene-server-00], distance :1]
]]
], com.wxxr.monitor.smslog.ISMSLogStatusMonitorService=HA Service :[
Service Id: com.wxxr.monitor.smslog.ISMSLogStatusMonitorService, allowInvocationsStatus :2
Replicants :[
1::Service : com.wxxr.monitor.smslog.ISMSLogStatusMonitorService , Provider : [ JBOSS Identity
address:dbp/192.168.123.154
instanceid:IDXSERVER0
JMX id:dbp_1338539640852
domain:WXXR
, site name: LUCENE ] , Route Table :[
Service Route Table:[
1:Service Route Entry : [Next Hop Partition:LUCENE , Next Hop Node:Node[lucene-server-00], distance :1]
]]
], [email protected]=HA Service :[
Service Id: [email protected], allowInvocationsStatus :2
Replicants :[
1::Service : [email protected] , Restrict Provider : [ JBOSS Identity
address:dbp/192.168.123.154
instanceid:IDXSERVER0
JMX id:dbp_1338539640852
domain:WXXR
, site name: LUCENEserving partition :LUCENE ] , Route Table :[
Service Route Table:[
1:Service Route Entry : [Next Hop Partition:LUCENE , Next Hop Node:Node[lucene-server-00], distance :1]
]]
2::Service : [email protected] , Restrict Provider : [ JBOSS Identity
address:dbp/192.168.123.154
instanceid:IDXSERVER1
JMX id:dbp_1338539640894
domain:WXXR
, site name: LUCENEserving partition :LUCENE ] , Route Table :[
Service Route Table:[
1:LOCAL ENTRY, Provider :[I@12c92f2
]]
]
, loadBalancePolicies@SiteAdminService=HA Service :[
Service Id: loadBalancePolicies@SiteAdminService, allowInvocationsStatus :2
Replicants :[
1::Service : loadBalancePolicies@SiteAdminService , Restrict Provider : [ JBOSS Identity
address:dbp/192.168.123.154
instanceid:IDXSERVER1
JMX id:dbp_1338539640894
domain:WXXR
, site name: LUCENEserving partition :LUCENE ] , Route Table :[
Service Route Table:[
1:LOCAL ENTRY, Provider :[I@10f94a0
]]
2::Service : loadBalancePolicies@SiteAdminService , Restrict Provider : [ JBOSS Identity
address:dbp/192.168.123.154
instanceid:IDXSERVER0
JMX id:dbp_1338539640852
domain:WXXR
, site name: LUCENEserving partition :LUCENE ] , Route Table :[
Service Route Table:[
1:Service Route Entry : [Next Hop Partition:LUCENE , Next Hop Node:Node[lucene-server-00], distance :1]
]]
]}

猜你喜欢

转载自nemogu.iteye.com/blog/1539416