You are here: Domain Administration > Creating the Domain and Adding Hosts > Setting Host Properties When Provisioning Hosts > Chaining Load Balancers

Chaining Load Balancers

On each host, the balancer property in the default.properties file accepts one or more load balancer policies separated by commas. If you specify more than one load balancer policy, then the broker tries to find a TE that satisfies the criteria required by the first load balancer in the chain. If a transaction engine is not found, then the broker tries to find a TE that meets the requirements of the next specified load balancer and so on. This is referred to as chaining load balancers. If no matching TE is found, a connection error occurs.

The RoundRobinBalancer will always find a suitable transaction engine if one exists. Therefore, this policy should appear only at the end of the chain.

If you plan to use the ChainableTagBalancer policy, decide which tag values you want to use for LBTag.A distributed database might have multiple TE process groups for different purposes. For example, suppose you have TEs for regular application transaction processing and another set of TEs for data analytics. The goal is to separate the two groups in order to avoid, for example, a long-running analytics query over a large data set that causes cache evictions on TEs that are optimized for short application transactions and different access paths.

Suppose the host tag values you choose are TP for transaction processing and AN for analytics.Assume you have two hosts. Set TP on host A for transaction processing, and set AN on host B for analytics:

Host Name Host Tag Name Host Tag Value
A LBTag TP
B LBTag AN

See Setting Host Tags for details on how to tag a host.

You could set the balancer host property like this:

balancer=ChainableTagBalancer,ChainableModBalancer

Test your setup by using the nuosql command line tool to connect to your broker:

$ nuosql db1@localhost --user dba --password pwd --connection-property "LBTag=TP"

The equivalent JDBC connection string is:

jdbc:com.nuodb://localhost:48004/db1?LBTag=TP