HomeMogDBMogDB StackUqbar

Documentation:v2.4

Supported Versions:

Parameter Configuration Precautions and Instructions

node.conf is the configuration file of MogHA. Most parameters in the configuration file have their default values which are recommended values based on experience. However, different users have different requirements for high availability. Therefore, it is recommended that parameters in the configuration file are optimized based on service scenarios.

This section provides parameter configurations for lite and non-lite modes based on several deployment architecture examples.

Parameter configurations can be adjusted for deployment architectures not listed based on the examples.

Configuration File Precautions

  1. The name of a configuration file cannot be started with spaces.
  2. A configuration file supports the boolean values, such as yes/no, on/off, true/false, and 1/0. true/false is recommended. Users can choose one type as they like, but it is recommended that a configuration file uses the same style.
  3. host[N] (N indicates an integer) in a configuration file can be set to a value equal to or greater than 1 and equal to or lower than 9. No sequence is required for instances.
  4. zone[N] (N indicates an integer) in a configuration file can be set to a value equal to or greater than 1 and equal to or lower than 3. The sequence of zones indicates the AZ priority. In MogHA, instances in the same zone have the same priority. zone1 indicates the primary AZ owning the highest priority. zone2 is an AZ with the priority lower than that of zone1. zone3 indicates the AZ with the lowest priority. Zone is a logical concept. It can be a physical equipment room but also be a zone where instances in different equipment rooms are located. Additionally, different instances in the same equipment room can be grouped into different zones to realize flexible priority control.
  5. The heartbeat_ips field in host[N] indicates the list of redundant IP addresses for heartbeat communication between MogHA nodes. The IP address is responsible for heartbeat communication. Once it fails, the redundant IP address is used. In most scenarios, it does not need to be configured. The redundant IP address can improve the heartbeat communication success rate. However, the redundant IP address is independent of services. Therefore, there is a scenario in which the heartbeat communication is normal but the service is interrupted due to the unavailable service IP address. The service should be interrupted but is not interrupted. Therefore, the parameter needs to be configured based on users' network scenarios.
  6. primary_lost_timeout indicates the timeout duration for a standby database to judge whether a primary database is lost. primary_lonely_timeout indicates the timeout duration for a primary database to judge whether it is isolated. The default values of the two parameters are 10s. If either of the parameters is modified, make sure that the value of primary_lost_timeout is equal to or greater than that of primary_lonely_timeout. Otherwise, brain split may occur. For example, a standby node takes over services from a primary node in advance and becomes a primary node, and the original primary node does not finish isolation check. In this case, if the network recovers, dual primary nodes will occur.

Lite Mode

Nodes Deployed in the Same Zone: One Primary Node and One Synchronous Standby Node

Limitations of the lite mode: A synchronous standby node is deployed, and the primary and standby nodes are configured in zone1.

Deployment Architecture

lite.png

Parameter Configuration

It is recommended that the default values are used for the parameters that are not listed. The parameters can be optimized based on different scenarios.

The values of the following parameters are set based on the IP address in the above architecture. The IP address needs to be replaced with the actual one.

[config]
lite_mode=true
# ...
# Other parameters are omitted.

[host1]
ip=192.168.1.100
heartbeat_ips=
[host2]
ip=192.168.1.101
heartbeat_ips=

[zone1]
hosts=host1,host2
ping_list=192.168.1.1
vip=192.168.1.200

Non-Lite Mode (Full Mode)

Nodes Deployed in the Same Zone: One Primary Node and Two Standby Nodes

Deployment Architecture

lite.png

Parameter Configuration

[config]
lite_mode=false
# ...
# Other parameters are omitted.

[host1]
ip=192.168.1.100
heartbeat_ips=
[host2]
ip=192.168.1.101
heartbeat_ips=
[host3]
ip=192.168.1.102
heartbeat_ips=

[zone1]
hosts=host1,host2,host3
ping_list=192.168.1.1
vip=192.168.1.200

Nodes Deployed in Different Zones: One Primary Node and Two Standby Nodes

Deployment Architecture

lite.png

Parameter Configuration

[config]
lite_mode=false
# ...
# Other parameters are omitted.

[host1]
ip=192.168.1.100
heartbeat_ips=
[host2]
ip=192.168.1.101
heartbeat_ips=
[host3]
ip=192.168.2.100
heartbeat_ips=

[zone1]
hosts=host1,host2
ping_list=192.168.1.1
vip=192.168.1.200
[zone2]
hosts=host3
ping_list=192.168.2.1
vip=192.168.2.200

Nodes Deployed in Different Zones: One Primary Node, Three Standby Nodes and One Cascaded Standby Node

Deployment Architecture

lite.png

Parameter Configuration

[config]
lite_mode=false
# ...
# Other parameters are omitted. 

[host1]
ip=192.168.1.100
heartbeat_ips=
[host2]
ip=192.168.1.101
heartbeat_ips=
[host3]
ip=192.168.2.100
heartbeat_ips=
[host4]
ip=192.168.3.100
heartbeat_ips=
[host5]
ip=192.168.3.101
heartbeat_ips=

[zone1]
hosts=host1,host2
ping_list=192.168.1.1
vip=192.168.1.200
[zone2]
hosts=host3
ping_list=192.168.2.1
vip=192.168.2.200
[zone3]
hosts=host4
ping_list=192.168.3.1
vip=192.168.3.200
cascades=host5
Copyright © 2011-2024 www.enmotech.com All rights reserved.