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 | 

Broker Mode

A broker can access a server with one of the following modes: Read Write, Read Only, Slave Only, or Preferred Host Read Only. This configuration value is determined by a user.

A broker finds and connects to a suitable server by trying to establish a connection in the order of server connections; this is, if it fails to establish a connection, it tries another connection to the next server defined until it reaches the last server. If no connection is made even after trying all servers, the broker fails to connect to a server.

For more information on how to configure broker mode, see cubrid_broker.conf.

Read Write

A broker that provides read and write services. This broker is usually connected to an active server. If no active servers exist, this broker will be connected to a standby server. For this reason, a Read Write broker can be temporarily connected to a standby server.

When the broker temporarily establishes a connection to a standby server, it will disconnect itself from the standby server at the end of every transaction so that it can attempt to find an active server at the beginning of the next transaction. When it is connected to the standby server, only read service is available. Any write requests will result in a server error.

The order of server connection is described below:

  1. The broker tries to establish a connection to an existing server connected (if exsits). The active status of the server means the connection is complete.
  2. The broker tries to establish a connection to the hosts specified in the databases.txt file in a sequence. The active status of the server means the connection is complete.
  3. The broker tries to establish a connection to the hosts specified in the databases.txt file in a sequence and connects to the first available host.

admin_ha_concept_broker_readwrite.png

Read Only

A broker that provides the read service. This broker is connected to a standby server if possible. For this reason, a Read Only broker can be connected to an active server temporarily.

Once it establishes a connection with an active server, it will maintain that connection even if a standby server exists. To disconnect from the active server and reconnect to a standby server, you should execute the cubrid_broker reset command. An error will occur when a Read Only broker receives a write request; therefore, only the read service will be available even if it is connected to an active server.

The order of server connection is described below:

  1. The broker tries to establish a connection to an existing server connected (if exsits). The standby status of the server means the connection is complete.
  2. The broker tries to establish a connection to the hosts specified in the databases.txt file in a sequence. The standby status of the server means the connection is complete.
  3. The broker tries to establish a connection to the hosts specified in the databases.txt file in a sequence and connects to the first available host.

admin_ha_concept_broker_readonly.png

Slave Only

A broker that provides the read service. This broker can only be connected to a standby server. If no standby server exists, no service will be provided.

The order of server connection is described below:

  1. The broker tries to establish a connection to an existing server connected (if exists). The standby status of the server means the connection is complete.
  2. The broker tries to establish a connection to the hosts specified in the databases.txt file in a sequence. The standby status of the server means the connection is complete.

admin_ha_concept_broker_slaveonly.png

Preferred Host Read Only

A broker that provides the read service. This works in the same manner as the Read Only broker except for its server connection order and server selecting criteria. The server connection order and server selecting criteria can be configured in PREFERRED_HOSTS. For more information on configuring these, see cubrid_broker.conf.

The order of server connection is described below:

  1. The broker tries to establish a connection to the hosts specified in PREFERRED_HOSTS in a sequence and connects to the first available host.
  2. The broker tries to establish a connection to the hosts specified in the databases.txt file in a sequence. The standby status of the server means the connection is complete.
  3. The broker tries to establish a connection to the hosts specified in the databases.txt file in a sequence and connects to the first available host.

admin_ha_concept_broker_preferred.png