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