XPanel cluster management
XPanel cluster management
01 System Overview
XPanel is a GUI for Klustron users to manage Klustron database clusters and monitor cluster node status, including all cluster management functions and functional interfaces for cluster status monitoring.
02 Introduction to cluster management functions
2.1 Cluster Management
The cluster management module is one of the key functions of the system, mainly including cluster list information, cluster display and abnormal cluster list.
The cluster list information page mainly operates on the overall cluster, including: create, delete cluster, add and delete shard, add and delete computing/storage nodes, full physical backup and recovery (rollback), logical backup and recovery, online DDL and repartition, cluster Functions such as expansion and contraction, active/standby switching of storage clusters, redoing standby machines, setting and obtaining instance variables, and node monitoring;
The cluster display page mainly displays the deployment diagram information of a single cluster, which is aimed at the operation of a single cluster; the list of abnormal clusters displays abnormal cluster information.
2.1.1 Cluster list
2.1.1.1 Cluster List Information
The cluster list information page can add new clusters, full backup, rollback clusters, cluster expansion, delete clusters, add/delete shards, add/delete nodes, master-standby switchover, redo standby machines, set delay alarm time, set and get instances Variables, node monitoring and other functional modules.
Add new cluster
To add a cluster, click the Add button, fill in the information and click OK to add a cluster, as shown in Figure 1 and Figure 2. The computer to be selected for the new cluster is optional, and it is divided into storage-type computers and computing-type computers. Note: If the entire cluster_mgr has not added any type of computer, it is impossible to add a new cluster operation.
figure 1
figure 2
After the cluster is successfully added, as shown in Figure 3. Among them, the selection of computer, high availability mode, number of shards, number of copies, cluster name, and buffer pool size are required items, and the rest are optional items. Click the More button to fill in the optional information, as shown in Figure 4. 5.
image 3
Figure 4
Figure 5
- Select the computer, the computer here is the computer that has been successfully added from the computer management, if you find that the selected computer is empty or there is no computer you want to choose, you can first add the computer in the computer management and then add a new cluster.
- High availability mode, if cluster_mgr is community edition: mgr, if cluster_mgr is enterprise edition: rbr.
- The number of shards is 1 by default and can be modified.
- The number of replicas, the default is 3.
- Business name, user input, required.
full backup
Full backup is to back up the existing cluster through some kind of backup storage target. After backup, you can find the relevant data backup files in the cluster backup list.
1、The prerequisite for full backup is that there must be a backup storage target in the system. If the backup storage target record is empty, backup is not allowed. Specifically, the new backup storage target will be configured during cluster_mgr and will be automatically reported after cluster_mgr is installed. Backup storage target, go to backup storage target management to see related records. The specific steps for initiating a full backup are shown in Figure 6.
Figure 6
2、After the backup storage target has been added, click the button to initiate a full backup, and the backup cluster working will be displayed. As shown in Figure 7.
Figure 7
3、Go to the full backup record to check whether the backup task just now is successful, done means success, and failed means failure. As shown in Figure 8. You can also go to the cluster backup list to view the data information that was just backed up at 2022-09-29 14:26:34. As shown in Figure 9.
Figure 8
Figure 9
Rollback cluster
Roll back the cluster, and restore a new cluster in the selected cluster. The new cluster is the same as the original cluster, and click Restore Cluster.
The rollback cluster is the data that the new cluster rolls back to a certain backup time point for the original backup cluster. Note):
- Rollback clusters need to have more than two clusters to initiate a rollback operation.
- After the rollback, the data of the new cluster will be overwritten by the backup data of the original cluster, and there will be a prompt on the page, please operate with caution.
1、Perform a cluster rollback operation on the cluster that already has data backup. If the cluster has not been backed up before the current time, there is no way to perform the cluster rollback operation. Will fail to rollback. As shown in Figure 10.
Figure 10
2、When the data backup file already exists, click the Rollback button, and a page will pop up, select the original cluster name, rollback time, and confirm the save to restore the cluster. Figure 11 shows. Note): The original cluster name and rollback time are required. Rollback time: The rollback time cannot be earlier than the earliest backup time and cannot be later than the current time.
Figure 11
3、After filling in the information, click OK to restore a new cluster, as shown in Figure 12 and Figure 13.
Figure 12
Figure 13
Cluster expansion
Cluster expansion is to migrate the table to a new shard when the load of a certain shard is too large to reduce the load and achieve the purpose of capacity expansion.
The premise of cluster expansion is that there are at least two shards in a cluster, and there are tables in the computing nodes of the cluster before the cluster expansion operation can be performed.
Cluster expansion includes manual table selection expansion and automatic table selection expansion.
Manually select the table to expand the specific operation, as shown in the following figure. 14~18.
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Automatic table selection and expansion, specific operations, as shown in Figure 19~22 below.
Figure 19
Figure 20
Figure 21
Figure 22
delete cluster
To delete a cluster, click Settings on the cluster list information page to enter the single cluster management page to perform cluster deletion operations. As shown in Figure 23, Figure 24, Figure 25, and Figure 26, after the cluster is successfully deleted, it is shown in Figure 27.
Note): After deleting the cluster operation, the data will be permanently lost, please operate with caution.
Figure 23
Figure 24
Figure 25
Figure 26
Figure 27
add shard
The following is to add a shard to the vito cluster, as shown in Figure 28~32 below. After the shard is added successfully, as shown in Figure 35-4 and 35-5. In the shard list, you can view the ip, port, active and standby nodes, node status and other information under the shard.
Figure 28
Figure 29
Figure 30
Figure 31
Figure 32
delete shard
To delete a shard, cluster list —> cluster list information —> select the setting on the right side of the vito cluster —> shard list —> select the delete button of shard_2, and click the delete operation to delete the shard. As shown in Figure 33~35.
Figure 33
Figure 34
Figure 35
add node
Adding nodes includes adding computing nodes and adding storage nodes.
1、Add computing nodes, as shown in Figure 36~40.
Figure 36
Figure 37
Figure 38
Figure 39
Figure 40
2、Add storage nodes, as shown in Figure 41~45.
Figure 41
Figure 42
Figure 43
Figure 44
Figure 45
delete node
Deleting nodes includes deleting computing nodes and deleting storage nodes.
1、Delete the storage node, as shown in Figure 46~49.
Figure 46
Figure 47
Figure 48
Figure 49
2、Delete the computing node, as shown in Figure 50~53.
Figure 50
Figure 51
Figure 52
Figure 53
Active/standby switchover
Active-standby switchover is mainly for the nodes under the cluster shard to perform active-standby switchover. The active-standby switchover is divided into manual active-standby switchover and automatic active-standby switchover. The active/standby switchover of XPanel is manually triggered. The specific operation is shown in Figure 54~57. Note): The backup node is not required, if not selected, the background will automatically switch randomly for the selected backup node.
Figure 54
Figure 55
Figure 56
Figure 57
Redo the standby node
Redo the standby node. When a certain standby node is abnormal, you need to redo the standby node. The redo standby machine field includes parameters such as selecting the shard name, the standby machine node to be redone, whether to pull data from the master node, master-standby delay, whether to back up, backup storage target, speed limit, etc.
Note):
- Standby nodes that need to be redone, this option is required, multiple choices are allowed, and multiple standby nodes can be redone at one time;
- If you want to pull data from the master node, if you select Yes, you don’t need to enter the master-standby delay time; otherwise, the default master-standby delay time is 30s, which is required and can be modified;
- If whether to backup, select Yes, the backup storage destination cannot be empty, and the default value of whether to backup is No;
- The default speed limit is 10KB/s, which can be modified.
The specific operation is shown in Figure 58~60.
Figure 58
Figure 59
Figure 60
Set the delay alarm time
The default alarm delay time is 100s. If it is not set, if it exceeds 100 by default, an abnormal alarm will be displayed in the cluster list. If the alarm time is set, it will be based on the latest alarm time, and if the set value is exceeded, a list exception alarm will appear.
The specific setting operation is shown in Figure 61 and Figure 62. After the setting is successful, when selecting the corresponding shard, the maximum delay time will be the latest setting time.
Figure 61
Figure 62
Setting and getting instance variables
Set the instance variable, select the storage node under shard to set, the variable types are int and string, just input the variable name and variable value to save. As shown in Figures 63 and 64. After the setting is successful, as shown in Figure 63-64.
Figure 63
Figure 64
get instance variable
To obtain an instance variable, select a node in the shard under the cluster, and enter the variable name to obtain the value of the instance variable. As shown in Figure 65. Figure 65
node monitoring
Node monitoring only needs to monitor the storage nodes and computing nodes, and display the basic connection information of the nodes. If you log in for the first time, you need to enter the account name and password, both of which are admin.
Node monitoring for storage nodes. As shown in Figures 66 and 67.
Figure 66
Figure 67
Node monitoring for storage nodes. As shown in Figures 68 and 69.
Figure 68
Figure 69
2.1.1.2 Cluster display
The cluster display mainly shows the deployment diagram of a single cluster. It shows the shards and computing nodes contained in a single cluster. The storage nodes are hidden by default. Click the + sign to expand the view, as shown in Figure 70 and Figure 71.
Figure 70
1、You can click the redio button in front of different clusters to switch between different clusters, as shown in Figure 72.
Figure 72
2、Click the icon of each node in the cluster to monitor the node.
Storage node monitoring. As shown in Figure 73 and Figure 74.
Figure 73
Figure 74
Compute node monitoring, as shown in Figure 75 and Figure 76. Figure 75
Figure 76
2.1.2 Cluster backup list
The cluster backup list mainly displays the list information of the backup cluster. When it was backed up, which cluster was backed up, and other related lists. It is mainly used to facilitate viewing of backup data. For example, I have successfully backed up the test cluster in the cluster list (as shown in Figure 77), then I can enter the cluster backup list to see the cluster information just backed up (as shown in Figure 78).
Figure 77
Figure 78
2.1.3 Backup Storage Target Management
The backup storage target management is to prepare for the backup cluster, because when backing up the cluster, there must be a backup storage target to back up successfully. Currently there is only one target type, which is HDFS. To add a backup storage target, click the Add button on the page and enter the target name; select the target type, currently there is only one type, HDFS, and it will be added later; enter the IP address and port number, and click OK to add a backup storage target. After clicking OK, the interface returns synchronously. As shown in Figure 79 and Figure 80
Figure 79
Figure 80
Edit backup storage destination
The editing operation is to update the existing storage target. The name cannot be edited during editing, and others can be edited. As shown in Figure 81 and Figure 82.
Figure 81
Figure 82
delete backup storage target
Search for the corresponding data by entering the target name, and click the delete button on the right to delete the storage target. As shown in Figure 83 and Figure 84 Note): The delete operation will be permanently deleted, please operate with caution.
Figure 83
Figure 84
2.2 Operation records
The operation record is mainly used to check the execution status of calling the background interface. If the status of going is in progress, the execution is not completed; if the status is done, it means that the execution is completed and the execution is successful; if the status is failed, it means that the execution failed. As shown in Figure 85.
Click the blue task ID button to view the details of the newly added cluster, as shown in Figure 86.
Figure 85
Figure 86
2.3 Cluster cut-off setting
According to business needs, it may be necessary to set the cut-free setting. The specific operation in XPanel is shown in Figure 87, Figure 88, and 89. Figure 87
Figure 88
Figure 89
Delete the cut-free settings, as shown in Figure 90 and Figure 91.
Figure 90
Figure 91
2.4 cluster_mgr status
You can check which cluster_mgr master is, and then which cluster_mgr is connected, and how many cluster_mgr nodes there are. The details are shown in Figure 92. Figure 92
2.5 Metadata cluster management
In the metadata cluster management, the metadata node list can view the information of the current metadata node. As shown in Figure 93. Figure 93