I would like to request confirmation on the best practice for running multiple HA-JDBC clusters on the same network (3 clusters, each containing 2 instances of a database). I have considered these 3 approaches:
Set each database ID to be unique in the network. They will all use the same JGroups cluster, but each HA-JDBC config will only contain the 2 databases it cares about:
Specify a name under the <distributable> tag. I looked in the HA-JDBC code and confirmed this sets the 'name' field on the JChannel. I don't think this is what we want, as I believe we want to set the name of the whole JGroups cluster to something unique, and not the channel.
Configure each cluster with a unique multi-cast port in stacks.xml: mcast_port="${jgroups.udp.mcast_port:45599}", where 45599 would be unique in each cluster.
The database ids do not need to be unique across clusters. Minimally, it is enough to use unique database cluster ids.
If you want to further isolate the JGroups channels from each other, simply use distinct multicast addresses.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All,
I would like to request confirmation on the best practice for running multiple HA-JDBC clusters on the same network (3 clusters, each containing 2 instances of a database). I have considered these 3 approaches:
<database id="cluster1db1">
<database id="cluster1db2">
Then the next cluster will use
<database id="cluster2db1">
<database id="cluster2db2">
And last will use
<database id="cluster3db1">
<database id="cluster3db2">
<distributable id="jgroups">
<property name="name">cluster1</property>
</distributable>
Configure each cluster with a unique multi-cast port in stacks.xml: mcast_port="${jgroups.udp.mcast_port:45599}", where 45599 would be unique in each cluster.
<distributable id="jgroups">
<property name="stack">stack.xml</property>
</distributable>
I believe #3 is the most fail safe option, but curious about #1. I don't think #2 is what we want here...
Thanks so much for the feedback!
The database ids do not need to be unique across clusters. Minimally, it is enough to use unique database cluster ids.
If you want to further isolate the JGroups channels from each other, simply use distinct multicast addresses.