Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

Multiple-Slave Node Structure

In multiple-slave node structure, there is one master node and several slave nodes to improve the service availability of CUBRID.

Because replication log copy process and replication log reflection process are running at all nodes in the CUBRID HA group, a load of copying replication log occurs. Therefore, all nodes in the CUBRID HA group have high network and disk usage.

Because there are many nodes with HA enabled, read and write services never fail as long as a single node is alive.

In the multiple-slave node structure, the node becoming a master node when failover occurs is determined by the order specified in ha_node_list. If the value of ha_node_list is node1:node2:node3 and the master node is node1, node2 will become a new master node when node1 fails.

admin_ha_comp_slave.png

An Example of Node Configuration

You can configure each node in the basic structure of HA as shown below:

  • node A (master node)
    • Configure the ha_mode of the cubrid.conf file to on.
    • ha_mode=on
    • The following is an example of configuring cubrid_ha.conf:
    • ha_port_id=12345
    • ha_node_list=cubrid@nodeA:nodeB:nodeC
    • ha_db_list=testdb1,testdb2
  • node B (slave node): Configure this node in the same manner as nodeA.
  • node C (slave node): Configure this node in the same manner as nodeA.

For the databases.txt file of a broker node, it is necessary to configure the list of hosts configured as HA in db-host according to their priority. The following is an example of the databases.txt file:

#db-name    vol-path                  db-host             log-path

testdb1     /home/cubrid/DB/testdb1   nodeA:nodeB:nodeC   /home/cubrid/DB/testdb1/log

Caution

The data in the CUBRID HA group may lose integrity when there are multiple failures in this structure.

  • In a situation where a failover occurs in the first slave node while replication in the second slave node is being delayed due to restart
  • In a situation where a failover re-occurs before replication reflection of a new master node is not complete due to frequent failover

In addition, if the mode of replication log copy process is ASYNC, the data in the CUBRID HA group may lose integrity.

If the data in the CUBRID HA group loses integrity for any of the reasons above, you can fix it by using Rebuilding Replications.