Unbalanced deployment

Asymmetric deployment is designed to provide a deployment method for enterprise users with resource constrained and highly available needs or with specific business scenario needs.

Before performing database deployment, the deployment preparation steps such as installation preparation, database package installation, etc. can be completed according to the cluster deployment steps under different systems.
For the installation of operating systems such as CentOS 7 and RedHat 7, click here; for the deployment steps of CentOS 8 and RedHat 8, please click here; For Ubuntu 20.04 deployment steps, please click here.

1 Database Deployment

1.1 Login UI

When the cluster is not deployed, use your browser to access the following graphical installation wizard URL, where the server with the IP address will become the master of your cluster (mdw in this example):

http://<IP>:8240/

On the first page of the installation wizard, you need to fill in the super user password and use the sudo more /etc/matrixdb6/auth.conf command to view it.

deployer_1

1.2 Select Multi-node Deployment

deployer_2

1.3 Add nodes

In this example, we add a node - sdw1.

deployer_3

Enter the IP address or hostname or FQDN of sdw1 in the text box and click OK.

deployer_4

deployer_5

1.4 Configure cluster parameters

Configure cluster parameters, here sdw1 is set as a standby node, and enable data mirroring, and set the number of single node instances to 2 primary + 2 mirror. The configuration here will be adjusted according to the balanced deployment (standard cluster configuration method).

deployer_6

1.5 Setting the storage path

Set the data storage path and etcd path.

deployer_7

1.6 Confirm execution information

This subsection is a key step in unbalanced deployment.

The execution deployment page is divided into 3 pages: basic information, node information and instance distribution.

1.6.1 Basic information

The basic information page displays three aspects of the connection information of the cluster in the current deployment plan, cluster size and high availability.

deployer_8

1.6.2 Node Information

The node information page displays the role of each node and the directory information list.

deployer_9

1.6.3 Instance Distribution

The instance distribution page displays the distribution topology map of all instances of the data cluster, including Master, Standby, Primary, and Mirror. Large squares represent nodes, small squares with numbers represent instances, and numbers are content id.

deployer_10

Put the mouse on the instance square and you can see the relevant information about the instance.

deployer_11

Click "Advanced Operations" and then click "Custom Instance Distribution" to see the original configuration file content of the instance distribution.

deployer_12

The content of the instance distribution configuration file is in CSV format. For each row, there are 4 columns in total, namely: content id, host name, port number, and data directory.

deployer_13

1.6.4 Rules for instance distribution configuration files

Customization of instance distribution configuration files should strictly follow the following rules.

Users need to edit the distribution rule file themselves, and customize and plan the desired unbalanced cluster topology by changing the host name, port number and data directory corresponding to the content id.

  • The first column is the content id and must be a sequence of integers starting from -1.
    • -1 It can appear once or twice, the first occurrence is master, the second occurrence is standby, and the second occurrence is standby, if an error occurs exceeds it.
    • 0 or above can occur once or twice, but the number of content ids must be consistent. 0 is not allowed to appear twice, but 1 only appears once. The first time it appears as primary, and the second time it appears as mirror.
  • The second column is the host name, which must be the host name range given by the template. You cannot add a new host name yourself. Adding a new host can only be done through the previous [1.3 Add Node] step.

    Note: The host name where the master is located in the first line cannot be changed, because the current browser page and background deployment commands are run on this machine, and changing them may cause unexpected errors.

  • The third column is the port number. On the same host, the port cannot be repeated.
  • The fourth column is the data directory. The data directory here is the mount point of the disk, not the final data directory path. For example, only /data2 is entered in the configuration file. After the deployment is finally completed, the actual data directory is /data2/mxdata_xxxxxxxxxxxxxxxx/master/mxseg-1/.

    Note: Changing the fourth column only affects the data directory of the corresponding segment. The storage path of etcd still follows the selection in the previous [1.5 Setting Storage Path].

After modifying the configuration file, click "OK". After saving successfully, you can see the configuration of the instance distribution changes in the instance distribution topology diagram.

deployer_14

deployer_15

1.7 Perform deployment

Click the "Execute Deployment" button to deploy the cluster and see the deployment progress.

deployer_16

1.8 Deployment successfully

After the deployment is successful, the **Access Guide page will be added, which mainly describes how to access the database.

deployer_17

At this point, the unbalanced deployment has been completed. Click the "Finish" button to jump to the UI homepage.

other

  • Support deployments containing blank machines (etcd only) In OLTP deployment, a three-machine topology can be implemented:
      mdw: master, seg0 (no workload), etcd0
      smdw: standby, etcd1
      sdw1 (low-fit hardware): etcd2