Menu

Multiple database clusters on the same network

Help
2014-11-03
2014-11-06
  • Brent Frederick

    Brent Frederick - 2014-11-03

    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:

    1. 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:

    <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">

    1. 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.

    <distributable id="jgroups">
    <property name="name">cluster1</property>
    </distributable>

    1. 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!

     
  • Paul Ferraro

    Paul Ferraro - 2014-11-06

    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.

     

Log in to post a comment.