Skip to main content
Tungsten Clustering

Connector Load Balancers

The load balancing model used, according to the selected QoS is defined by a number of different load balancing classes. These are configured automatically when different QoS is selected, be explicitly changed by altering the configuration file. The supported load balancers are detailed in the table below:

Load BalancerDefault QoSDescription
DefaultLoadBalancerRW_STRICTAlways selects the Primary data source
MostAdvancedSlaveLoadBalancerRO_RELAXEDSelects the Replica that has replicated the most events, by comparing data sources 'high water' marks. If no Replica is available, the Primary will be returned.
LowestLatencySlaveLoadBalancerSelects the Replica data source that has the lowest replication lag, or appliedLatencyin ls -l within cctrl output. If no Replica data source is eligible, the Primary data source will be selected.
RoundRobinSlaveLoadBalancerSelects a Replica in a round robin manner, by iterating through them using internal index. Returns the Primary if no Replica is found online
HighWaterSlaveLoadBalancerRW_SESSIONGiven a session high water (usually the high water mark of the update event), selects the first Replica that has higher or equal high water, or the Primary if no Replica is online or has replicated the given session event. This is the default used when SmartScale is enabled.

The default setting is MostAdvancedSlaveLoadBalancer.

To change the Connector load balancer, specify the property in the configuration, i.e to use Round Robin, add the following to the [defaults] stanza of your /etc/tungsten/tungsten.ini and issue tpm update:

property=dataSourceLoadBalancer_RO_RELAXED=com.continuent.tungsten.router.resource.loadbalancer.RoundRobinSlaveLoadBalancer

or for staging deployments, issue the following from the staging server:

shell> ./tools/tpm update alpha --property=dataSourceLoadBalancer_RO_RELAXED=com.continuent.tungsten.router.resource.loadbalancer.RoundRobinSlaveLoadBalancer