Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 | 

HA Configuration

To use the HA feature, the following configuration is required.

System Architecture


To perform failover and failback, the Heartbeat solution of Linux-HA project should be installed in each system where the database server is running. For Heartbeat configuration, see a separate Heartbeat installation document.

You can also configure the system in a way it can more flexibly address failures that may cause the system to stop by configuring the broker and the database in separate systems.

Configuring the Database Server

To use the HA feature, you should set the ha_mode parameter to on in the cubrid.conf file. If the ha_mode parameter is not set, the default value is off. Then, it runs as a general server without the HA feature.



To see if the database server is using the HA feature and which HA mode is running, the cubrid changemode utility can be used. You can also use the CSQL command (;database) to check the HA mode of the currently runing database server. The HA mode is one of the followings: active, standby, or maintenance.

% cubrid changemode demodb

The server 'demodb''s current HA running mode is active.

csql> ;database

      demodb@localhost (active)

Configuring the Broker

The default operation mode of the broker is one that requires read and write operations. If necessary, set it as a Read only or Slave only broker by using the ACCESS_MODE parameter in the cubrid_broker.conf file.




RW := Read-Write broker (Default value)

RO := Read-Only broker

SO := Slave-Only broker

You can check the operation mode of a running broker with the -f parameter of the cubrid broker status utility. For more information about the broker status, see Checking the Broker Status.

% broker1  - cub_cas [4430,40821] /home/CUBRID/log/broker/broker1.access /home/CUBRID/




1 26946 0   0  51168 IDLE      2009/11/06    16:06:41    -    -                        -
2 26947 0   0  51172 IDLE      2009/11/06    16:06:41    -    -                        -
3 26948 0   0  51172 IDLE      2009/11/06    16:06:41    -    -                        -
4 26949 0   0  51172 IDLE      2009/11/06    16:06:41    -    -                        -
5 26950 0   0 51172  IDLE      2009/11/06    16:06:41    -    -                        -

Setting Database Host Information

You need to add the host information of the Active and the Standby servers to be used in the HA configuration to the database location file (database.txt) in the broker/server system. The Active and the Standby servers are separated by a colon (:). More than one Standby servers can be added with each host being separated by a colon (:).


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

nbd2            /home/db/db2      server_s1:server_s2       /home/db/db2

nbd1            /home/db/db1      server_s1:server_s2       /home/db/db1