Load Balancing Structure

The load balancing structure increases the availability of the CUBRID servie by placing several nodes in the HA configuration (one master node and one slave node) and distributes read-load.

Because the replica nodes receive replication logs from the nodes in the HA configuration and maintain the same data, and because the nodes in the HA configuration do not receive replication logs from the replica nodes, its network and disk usage rate is lower than that of the multiple-slave structure.

Because replica nodes are not included in the HA structure, they provide read service without failover, even when all other nodes in the HA structure fail.

An Example of Node Configuration

You can configure each node in load balancing structure as shown below:

node A (master node)

Configure the ha_mode of the cubrid.conf file to on.

ha_mode=on

The following example shows how to configure cubrid_ha.conf:

ha_port_id=59901

ha_node_list=cubrid@nodeA:nodeB

ha_replica_list=cubrid@nodeC:nodeD

ha_db_list=testdb

node B (slave node): Configure this node in the same manner as node A.

node C (replica node)

Configure the ha_mode of the cubrid.conf file to replica.

ha_mode=replica

You can configure the cubrid_ha.conf file in the same manner as node A.

node D (replica node): Configure this node in the same manner as node C.

You must enter the list of DB server hosts in the order so that each broker can be connected appropriate HA or load balancing server in the databases.txt file of a broker node.

The following is an example of the databases.txt file in node A and node B.