This is a short post on some JBoss clustering options when working with cloud platforms. There are also other possibilities such as using tunnels but I will cover that in a later post. I am also not going to write right now about other considerations such as security, reliability etc.
I am currently a Solution Architect and I work on designing Cloud Services solutions. We're making use of Microsoft Azure Cloud Platform to deliver our services to clients.
I am going to outline a few thoughts regarding JBoss clustering in the cloud.
As you might be aware, usually cloud infrastructures do not allow for IP multicasts. Usually a cluster configuration needs to account for this and choose alternate protocol stacks to work around this limitation.
Usually this means dropping UDP, relying on TCP and either configuring the nodes IPs in the cluster configuration files or relying on TCPGOSSIP to emulate the multicast for you. The TCP alternative is less scalable since more network traffic is involved between the JBoss nodes as opposed to UDP.
I will focus on two ways of handling the clustering: TCP + TCPPING and TCP + TCPGOSSIP.
TCP + TCPPING
This configuration usually involves manually configuring JBoss nodes within the cluster configuration. While it is simpler to setup, it has the drawback that one needs to adjust the configuration if the cluster needs to scale dynamically - for instance if you need to adjust the number of cluster members based on the current system load (automatic provisioning of cloud resources).
<subsystem xmlns="urn:jboss:domain:jgroups:1.1" default-stack="tcpping">
<stack name="tcpping">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<protocol type="TCPPING">
<property name="initial_hosts">1.1.1.1[7600],1.1.1.2[7600]</property>
<property name="num_initial_members">2</property>
<property name="port_range">0</property>
<property name="timeout">2000</property>
</protocol>
<!-- ... -->
</stack>
</subsystem>
TCP + TCPGOSSIP
If you go the TCPGOSSIP route, then the server or servers hosting the TCPGOSSIP instances need access to all the JBoss nodes. The good news is that you can configure more than one TCPGossip instance so you are covered from the availability standpoint. All traffic between the JBoss nodes is routed through the TCPGOSSIP instances.
<subsystem xmlns="urn:jboss:domain:jgroups:1.1" default-stack="tcpgossip">
<stack name="tcpgossip">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<protocol type="TCPGOSSIP">
<!-- GossipRouters -->
<property name="initial_hosts">1.1.1.1[12001],1.1.1.2[12001]</property>
<property name="num_initial_members">2</property>
<property name="timeout">3000</property>
</protocol>
<!-- ... -->
</stack>
</subsystem>
Enjoy :)
Niciun comentariu:
Trimiteți un comentariu