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 | 



cubrid.conf

The cubrid.conf file that has general information on configuring CUBRID is located in the $CUBRID/conf directory. This section explains the cubrid.conf parameters used by CUBRID HA.

ha_mode

A parameter used to configure whether to use CUBRID HA. The default value is off.

  • off : CUBIRD HA is not used.
  • on : CUBRID HA is used. Failover is supported for its node.
  • replica : CUBRID HA is used. Failover is not supported for its node.

The ha_mode parameter can be re-configured in the [@<database>] section; however, only off can be entered in the case. An error is displayed if a value other than off is entered in the [@<database>] section.

If ha_mode is on, the CUBRID HA values are configured by reading cubrid_ha.conf.

This parameter cannot be modified dynamically. To modify the value of this parameter, you must restart the corresponding node.

log_max_archives

This parameter configures the minimum number of archive log files to be archived. The minimum value is 0 and the default is INT_MAX. The performance of the parameter is affected by force_remove_log_archives.

The existing archive log files to which the activated transaction refers or the archive log files of the master node not reflected to the slave node in HA environment will not be deleted. For details, see the following force_remove_log_archives.

For details about log_max_archives, see Logging-Related Parameters.

force_remove_log_archives

It is recommended to always maintain the archive logs needed to perform the HA related process by setting a value for force_remove_log_archives to no in order to implement the HA environment by setting a value for ha_mode to on.

If you set for force_remove_log_archives to yes, the archive log files which will be used in the HA related process can be deleted, and this may lead to an inconsistency between replicated databases. If you want to maintain free disk space even with this risk, set for force_remove_log_archives to yes.

For details about force_remove_log_archives, see Logging-Related Parameters.

max_clients

A parameter used to specify the maximum number of clients to be connected to a database server simultaneously. The default is 50.

Because the replication log copy process and the replication log reflection process are started by default if CUBRID HA is used, you must configure the value to twice the number of all nodes in the CUBRID HA group, except the corresponding node. Furthermore, you must consider the case in which a client that was connected to another node at the time of failover attempts to connect to that node.

The Parameters That Must Have the Same Value for All Nodes
  • log_buffer_size: The size of a log buffer. This must be same for all nodes, as it affects the protocol between copylogdb that duplicate the server and logs.
  • log_volume_size: The size of a log volume. In CUBRID HA, the format and contents of a transaction log are the same as that of the replica log. Therefore, the parameter must be same for all nodes. If each node creates its own DB, the cubrid createdb options (--db-volume-size, --db-page-size, --log-volume-size, --log-page-size, etc.) must be the same.
  • cubrid_port_id: The TCP port number for creating a server connection. It must be same for all nodes in order to connect copylogdb that duplicate the server and logs.
  • HA-related parameters: HA parameters included in cubrid_ha.conf must be identical by default. However, the following parameters can be set differently according to the node.
    • The ha_mode parameter in replica node
    • The ha_copy_sync_mode parameter
    • The ha_ping_hosts parameter
Example

The following example shows how to configure cubrid.conf. Please take caution when configuring log_max_archives and force_remove_log_archives (logging-related parameters), and ha_mode (an HA-related parameter).

max_clients=200

 # Service Parameters

[service]

service=server,broker,manager

 

 

# Server Parameters

server=testdb

data_buffer_size=512M

log_buffer_size=4M

sort_buffer_size=2M

max_clients=200

cubrid_port_id=1523

db_volume_size=512M

log_volume_size=512M

 

# Adds when configuring HA (Logging parameters)

log_max_archives=100

force_remove_log_archives=no

 

# Adds when configuring HA (HA mode)

ha_mode=on

log_max_archives=100