3 Replies Latest reply on Dec 11, 2018 9:27 AM by jbertram

    Is Dynamic Server discovery possible with static tcp connectors.

    t.harris

      Hi,

      Please bear with me ...this may be a little off topic.

      Have deployed hornetq HA (2 co-located, shared nothing, live-backup pairs) on  EAP 6.4 using docker images on kubernetes cluster (minikube).

      I am using static tcp clustering (TCPPING) (UDP not allowed in our cloud infra) passing the kubernetes headless service (replicas=2) names as -D params to standalone.xml.

      jms-0.jms jms-1.jms i.e. jms-0.jms is GroupA-live  GroupB-backup and jms-1.jms is GroupB-live and GroupA-backup

      These service names get resolved to POD entry-point IPs.

      Cluster seems to form and Active can see Backup...etc. However when I delete a POD (Active or Backup) the POD and this service can be re-instantiated on a different IP.

      Kubernetes POD IP are not sticky.

      Now my question... can  Hornetq  be configured to dynamically re-discover and re-resolve the service names to the new IP i.e. without a restart of the no-restarted POD.

      This may be a contradiction in concepts but is it possible to configure hornetq  to Dynamic re-discovery servers with static tcp connectors.

      Seems like once the tcp cluster is formed and a broker gets re-establishd on a new IP the Live / backup cannot sync until both are restarted and service names get re-resolved.

       

      I know  Active MQ has a concept of a Discover Agent that I can provide an implementation of that is kubernetes POD aware ....but currently we are confined to using Hornetq

      due to legacy jms clients.

       

      Kind Regards

      T

        • 1. Re: Is Dynamic Server discovery possible with static tcp connectors.
          jbertram

          Since you mention TCPPING I assume you've configured HornetQ to use JGroups for clustering rather than either of the built-in mechanisms (UDP multicast or static TCP).  We added support for JGroups specifically for cloud and cloud-like use-cases as it has support for all kinds of environments.  I believe you can configure something like KUBE_PING to do discovery in a Kubernetes environment.  That said, this is really a JGroups question which you should ask on the JGroups forum.

          • 2. Re: Is Dynamic Server discovery possible with static tcp connectors.
            t.harris

            Ok, Leaving JGroups aside, if I was using static TCP and the live or backup restarted and bound to an different IP (dynamic)  then I suppose the live/backup communication pairing will break..? as the IPs are not really static. I kinda hoped if I used a service name that they would some how re-resolve and sync up again.... apparently not. :-( 

            • 3. Re: Is Dynamic Server discovery possible with static tcp connectors.
              jbertram

              Ok, Leaving JGroups aside, if I was using static TCP and the live or backup restarted and bound to an different IP (dynamic)  then I suppose the live/backup communication pairing will break..?

              In general, yes, it would break. However, if you used hostnames in your configuration and had a service which automatically mapped the new IP address to the hostname then it would work.

               

               

              I kinda hoped if I used a service name that they would some how re-resolve and sync up again.... apparently not. :-( 

              I believe you can get what you want by using JGroups and one of their cloud discovery mechanisms (e.g. KUBE_PING which I mentioned previously).

              1 of 1 people found this helpful