1 Reply Latest reply on Mar 26, 2012 11:18 AM by dejanb_dejan

    Client URI for loadbalancing and failover

    abrennan_abrennan

      Say we have a network of brokers, 4 in total, 2 in one location, 2 in another. We want clients to loadbalance across the 2 local instances, and failover to any of the 2 remote instances.

       

      What should the client connection URI look like?

       

       

      Simple local loadbalancing is like this:

       

      failover:(tcp://local1:61616,tcp://local2:61616)

       

      Simple failover to a remote instance is like this:

       

      failover:(tcp://local1:61616,tcp://remote1:61616)?randomize=false

       

      but I don't think I can combine the two like this:

       

      failover:(failover:(tcp://local1:61616,tcp://local2:61616), failover:(tcp://remote1:61616,tcp://remote2:61616))?randomize=false

       

      The closest I've seen is described in the  Failover Transport Reference  and looks like this:

       

      failover:(tcp://local1:61616,tcp://local2:61616,tcp://remote1:61616)?randomize=false&priorityBackup=true&priorityURIs=tcp://local1:61616,tcp://local2:61616

       

      I don't think this will really loadbalance... it'll just try to revert to either local1 or local2 after a failover to remote1.

       

      Any ideas?

       

      Cheers,

      -Adrian