ADD BACKEND
Description
The ADD BACKEND is used to add one or more BE nodes to the Doris cluster. This command allows administrators to specify the host and port of the new BE nodes, as well as optional properties to configure their behavior.
Syntax
ALTER SYSTEM ADD BACKEND "<host>:<heartbeat_port>"[,"<host>:<heartbeat_port>" [, ...]] [PROPERTIES ("<key>"="<value>" [, ...] )]
Required Parameters
1.
It can be the hostname or IP address of the BE node.
2. <heartbeat_port>
The heartbeat port of the BE node, the default is 9050.
Optional Parameters
1. PROPERTIES ("<key>"="<value>" [, ... ] )
A set of key-value pairs used to define additional properties of the BE node. These properties can be used to customize the configuration of the BE being added. Available properties include:
tag.location
: Used to specify the Resource Group to which the BE node belongs in the integrated storage and computing mode.tag.compute_group_name
: Used to specify the compute group to which the BE node belongs in the decoupling storage and computing mode.
Access Control Requirements
The user executing this SQL must have at least the following permissions:
Privilege | Object | Notes |
---|---|---|
NODE_PRIV |
Usage Notes
- Before adding a new BE node, make sure the node is correctly configured and running.
- Using Resource Group can help you better manage and organize the BE nodes in the cluster.
- When adding multiple BE nodes, you can specify them in one command to improve efficiency.
- After adding the BE nodes, use the
SHOW BACKENDS
to verify whether they have been successfully added and are in a normal state. - Consider adding BE nodes in different physical locations or racks to improve the availability and fault tolerance of the cluster.
- Regularly check and balance the load in the cluster to ensure that the newly added BE nodes are properly utilized.
Examples
-
Add BE nodes without additional properties
ALTER SYSTEM ADD BACKEND "192.168.0.1:9050,192.168.0.2:9050";
This command adds two BE nodes to the cluster:
- 192.168.0.1,port 9050
- 192.168.0.2,port 9050 No additional properties are specified, so the default settings will be applied.
-
In the integrated storage and computing mode, add a BE node to a specified Resource Group
ALTER SYSTEM ADD BACKEND "doris-be01:9050" PROPERTIES ("tag.location" = "groupb");
This command adds a single BE node (hostname doris-be01, port 9050) to the Resource Group
groupb
in the cluster. -
In the decoupling storage and computing mode, add a BE node to a specified compute group
ALTER SYSTEM ADD BACKEND "192.168.0.3:9050" PROPERTIES ("tag.compute_group_name" = "cloud_groupc");
This command adds a single BE node (IP 192.168.0.3, port 9050) to the compute group
cloud_groupc
in the cluster.