Nodes
The nodes in a load balancing cluster are used to listen to load balancing instances and forward client requests to the back-end servers according to the listening and forwarding rules.
There can be multiple forwarding nodes under the same cluster, but only one node provides forwarding service as Master node at the same moment. The VRRP route IDs of the nodes belonging to a cluster must be the same.
Node lifecycle management.
- Create node: Set the configuration parameters of the node.
- Deploy a node: Distribute the configuration file of the node to the specified machine. The machine that provides forwarding function can be called forwarding instance. When the node status is Master, it means that the nodes in the cluster can provide load balancing forwarding service normally. When the node status is Master, it means that the nodes in the cluster can provide load balancing forwarding service normally.
- Delete node: Delete the profile information of the node, etc.
Entry: In the cloud management platform, click the top left corner of navigation menu, and click “Network/Load Balance Cluster/Node” menu item in the left menu bar that pops up to enter the node page.
Create node
This function is used to create a node under the specified cluster.
-
Click the “Create” button at the top of the list to bring up the Create Node dialog box.
-
Configure the following parameters.
- Name: the name of the node.
- Cluster: The cluster to which the node belongs. If there is no suitable cluster, you can click the “Create” hyperlink under the input box to create a cluster.
- Priority: Set the priority of the node, the higher the number the higher the priority, the node with higher priority is master by default.
- Preemption mode: set whether to enable the preemption mode, when the preemption mode is enabled, if the backup node with high priority meets the master node with low priority, the backup node will be preempted to become the master node.
- VRRP route ID: set the VRRP route ID of the node, the VRRP route ID of the nodes under the same cluster must be the same, and the VRRP route ID of the nodes under different clusters must be different.
- VRRP NIC: the name of the NIC used by the node to broadcast announcements.
- VRRP announcement interval: VRRP broadcast announcement interval, which is related to the sensitivity of automatic switchover in case of failure.
Advanced configuration: hidden by default, can be configured according to requirements.
- VRRP Password: Set the password for VRRP communication, the VRRP password of the primary and backup nodes must be the same, and if it is empty, the password will be YunionLB by default.
- Forwarding instance heartbeat timeout time: Set the heartbeat timeout time of the server deployed in the forwarding node. When the server that exceeds the timeout time does not receive the heartbeat, the status will change to UNKNOWN, the default is 3600 seconds, and the range of values is 600~3600.
- Configure Telegraf parameters.
- InfluxDB address: used to monitor the data upload channel, generally InfluxDB is deployed on the control node, the format is https://控制节点IP地址:30086.
- InfluxDB database name: Set the name of InfluxDB database.
- Monitoring data collection interval: Set the interval for telegraf to collect monitoring data, the default is 5s, and the value range is 1~600.
- Configuration template: You can customize the telegraf configuration template according to the requirements.
- Configure HAProxy parameters.
- Number of HAProxy threads: Set the number of HAProxy threads, please set according to the actual situation. The default is 1, and the value range is 1~64.
- Log output setting: Set the location of log saving, support saving to local or remote server, input format such as “/dev/log”, IP, IP:port, etc. If empty, it means no logging.
- Log HTTP logs: whether to log HTTP type logs.
- Log TCP log: whether to log TCP type logs.
- Log Normal log: If or not logging normal logs.
- Maximum number of http headers in request: set the maximum number of http headers in request, the default is 101, the value is 1~32767.
- Configuration template: You can customize the HAProxy configuration template according to your requirements.
- Configure Keepalived parameters.
- Configuration Template: You can customize the Keepalived configuration template according to the requirements.
-
Click the “OK” button to create the node.
Deployment
After the node is created, you need to deploy it on a server, host or external machine to use it properly. The process of deploying the node is to distribute the configuration file to the bound server.
Note
When there is a service configuration on the forwarding node that listens to a port of any IP, it will cause the listening on the corresponding protocol port to be configured on the LB instance using the forwarding node to not work properly.
# View the ports listening on any IP on the forwarding node
$ netstat -nlp |grep 0.0.0.0:
tcp 0 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 7120/sshd
If you need to configure TCP port 22 listening on the LB instance, you need to change the sshd configuration file of the forwarding node from #ListenAddress 0.0. 0.0.0
to ListenAddress <forwarding node IP>
.
-
Click the “Deploy” button on the right column of the node to bring up the Deployment dialog box.
-
Configure the following parameters.
- Specify the system user: You need to use the system administrator user to deploy the node. Set the item as “system”, select the system user name with known password and enter the corresponding password. If there is no known system user password, you can create system user lbagent user by climc command and deploy with lbagent user and password.
Description
# Create the lbagent system user $ climc user-create lbagent --password xxx --system-account # Add the lbbagent user to the system project with the role of administrator $ climc project-add-user system lbagent admin
- Deployment type: Select the forwarding instance node, please try to select mutually independent servers, hosts or external machines.
- When selecting server, it is required that the server is in the same zone as the load balancing cluster, and the server is connected to the control node network.
- When selecting a host, the host is required to be in the same zone as the load balancing cluster, and the host is connected to the control node network.
- When selecting an external machine, the ansible server (typically the control node) is required to have access to the target machine. And the cloudroot user exists on the target machine, and the cloudroot user supports sudo login, and the administrator can login to the cloudroot with a public key.
Description
# Get the admin public key $ climc sshkeypair-show --admin
- Yum source address: Yum source address, [https://yunioniso.oss-cn-beijing.aliyuncs.com/iso/{version}/rpms](https://yunioniso.oss-cn-beijing.aliyuncs.com/ iso/{version}/rpms), and it is recommended to leave the Yum source TLS checksum unchecked.
- Specify the system user: You need to use the system administrator user to deploy the node. Set the item as “system”, select the system user name with known password and enter the corresponding password. If there is no known system user password, you can create system user lbagent user by climc command and deploy with lbagent user and password.
-
Click the “OK” button to bring up the Deployment dialog box and view the deployment status of the node.
-
If the deployment is not completed, you can click the “Deploy” button again and click the “Details” hyperlink in the “Task is in progress” box in the pop-up deployment dialog to view the deployment status of the node. After the node is deployed, it will display the node’s primary and backup and heartbeat information.
Offline Node
This function is used to downlink a node, which will remove the node profile from the deployment host.
- Click the “Offline” button on the right action bar of the node to bring up the Offline Confirmation dialog box.
- Click the “OK” button to take down the node.
Modify Node
This function is used to modify the configuration information of the node.
- Click the “More” button in the operation column on the right of the node, and select the “Modify” menu item in the drop-down menu to enter the Modify Node page.
- Modify the relevant parameters and click the “OK” button.
Set the heartbeat timeout time
This function is used to modify the heartbeat timeout time of the forwarding instance. When the forwarding instance does not receive a heartbeat after the timeout period, the node status will change to UNKNOWN.
- Click the “More” button in the operation bar on the right side of the node and select the drop-down menu “Set the heartbeat timeout time menu item to bring up the Set Heartbeat Timeout dialog box.
- Set the forwarding instance heartbeat timeout time and click the “OK” button to complete the operation.
Delete Node
You can delete a node only after the node is offline.
- Click the “Delete” button on the right column of the node to bring up the Delete Confirmation dialog box.
- Check the box “Make sure the actual operation has been offline” and click the “OK” button to delete the node.
View Node Details
This function is used to view the configuration information of the node, etc.
- On the node page, click the node name item to enter the node details page.
- The menu item at the top of the details page supports managing nodes.
- View the following information.
- Basic Information: View the Cloud ID, ID, name, status, domain, project, cluster, primary and backup, last heartbeat, zone, heartbeat timeout time, deployed machine, created at, updated at, and notes of the node.
- Synchronization timestamp: Indicates that parameters such as load balancing instances, listeners, backend server groups, backend servers, forwarding policies, access control, certificates, etc. in the database existed, complete, and verifiable data was written to the deployment machine before a specific time.
- VRRP forwarding instance configuration information: Including announcement interval, network port, password, preemption mode, priority, and route ID information.
- HAProxy Configuration Information: View HAProxy configuration information, including number of threads, enable logging, enable HTTP logging, enable Normal logging, enable TCP logging, and configuration template information.
- Telegraf (data collection tool) configuration information: view Telegraf configuration information, including HAProxy reporting interval, database name, address, and configuration template information.
- KeepAlived configuration information: View the KeepAlived configuration template information.
View Deployment Details
This function is used to view the log information of the last deployment output of the node, and is used to troubleshoot through the output log when the deployment fails, etc. The deployment details will only appear after the node is deployed.
- On the node details page, click the Deployment Details tab to enter the Deployment Details page.
- View the deployment details and output logs of the node.
- Support re-execution or termination of execution operations, etc.
View operation logs
This function is used to view the log information of node-related operations.
- On the node details page, click the “Operation Log” tab to enter the operation log page.
- Load more logs: In the operation log page, the list shows 20 operation logs by default. If you want to view more operation logs, please click “Load more” button to get more log information.
- View Log Details: Click the “View” button on the right column of the operation log to view the log details. Copy details are supported.
- View logs of specified time period: If you want to view the operation logs of a certain time period, set the specific date in the start date and end date at the top right of the list to query the log information of the specified time period.
- Export logs: Currently, only the logs displayed on this page are supported to be exported. Click the upper-right corner of icon, set the export data column in the pop-up export data dialog, and click the “OK” button to export the logs.