Load Balancing between the primary and backup broker

Posted by appmath on 02-Apr-2012 18:34

I have noticed that unlike fault tolerance, load balancing isn't well documented. For example, I didn't see any diagrams that explain exactly how load balancing works (not in a cluster configuration).

Can you please point me to the right document? I would like to know specifically how the primary broker and the backup broker orchestrate their load balancing.

Thanks.

All Replies

Posted by pmeadows on 03-Apr-2012 09:26

Hi Aziz,

The way a fault tolerant (CAA) pair of SonicMQ brokers works is that at any given time, one is active and the other is standby.  When a broker is in the standby state it won't accept connections.  The standby just replicates state from the active broker so it's ready to take over the active role if it detects that the active broker has failed.  Therefore it's not possible to load-balance between the primary and backup brokers within a CAA pair.

To handle load balancing brokers should be clustered.

It's common to combine clustering and fault tolerance by having two or more CAA broker pairs in a cluster, for example:

Host A:

  Broker1 (Primary)  - in ClusterC1

  Broker2 (Backup)  - in ClusterC1

Host B:

  Broker1 (Backup)  - in ClusterC1

  Broker2 (Primary)  - in ClusterC1

Typically the primary brokers will be active, so during normal running JMS connections would be load-balanced between Broker1 (Primary) on HostA and Broker2 (Primary) on HostB (since Broker1 and Broker2 are members of the same cluster - ClusterC1).  If Host A was to fail then Broker1 (Backup) would take over the active role from Broker1 (Primary).  At this point connections would be load-balanced between Broker1 (Backup) on HostB and Broker2 (Primary) on HostB.
Thanks, Paul.

This thread is closed