Elastic scaling
High availability of FE can be achieved by expanding FE to three top-one nodes.
Users can login to Master FE through MySQL client. By:
To view the current FE node situation.
You can also view the FE node through the front-end page connection: http://fe_hostname:fe_http_port/frontend
or http://fe_hostname:fe_http_port/system?Path=//frontends
.
All of the above methods require Doris’s root user rights.
The process of FE node expansion and contraction does not affect the current system operation.
FE is divided into three roles: Leader, Follower and Observer. By default, a cluster can have only one Leader and multiple Followers and Observers. Leader and Follower form a Paxos selection group. If the Leader goes down, the remaining Followers will automatically select a new Leader to ensure high write availability. Observer synchronizes Leader data, but does not participate in the election. If only one FE is deployed, FE defaults to Leader.
The first FE to start automatically becomes Leader. On this basis, several Followers and Observers can be added.
Configure and start Follower or Observer.
Follower and Observer are configured with Leader. The following commands need to be executed at the first startup:
bin/start_fe.sh --helper host:edit_log_port --daemon
The host is the node IP of Leader, and the edit_log_port in Lead’s configuration file fe.conf. The —helper is only required when follower/observer is first startup.
Add Follower or Observer to the cluster
Add Follower or Observer. Connect to the started FE using mysql-client and execute:
or
ALTER SYSTEM ADD OBSERVER "observer_host:edit_log_port";
The follower_host and observer_host is the node IP of Follower or Observer, and the edit_log_port in its configuration file fe.conf.
View the status of Follower or Observer. Connect to any booted FE using mysql-client and execute:
SHOW PROC '/frontends';
You can view the FE currently joined the cluster and its corresponding roles.
Delete the corresponding FE node using the following command:
Users can login to Leader FE through mysql-client. By:
SHOW PROC '/backends';
To see the current BE node situation.
All of the above methods require Doris’s root user rights.
The expansion and scaling process of BE nodes does not affect the current system operation and the tasks being performed, and does not affect the performance of the current system. Data balancing is done automatically. Depending on the amount of data available in the cluster, the cluster will be restored to load balancing in a few hours to a day. For cluster load, see the Tablet Load Balancing Document.
The BE node is added in the same way as in the BE deployment section. The BE node is added by the ALTER SYSTEM ADD BACKEND
command.
There are two ways to delete BE nodes: DROP and DECOMMISSION
The DROP statement is as follows:
ALTER SYSTEM DROP BACKEND "be_host:be_heartbeat_service_port";
Note: DROP BACKEND will delete the BE directly and the data on it will not be recovered!!! So we strongly do not recommend DROP BACKEND to delete BE nodes. When you use this statement, there will be corresponding error-proof operation hints.
DECOMMISSION clause:
ALTER SYSTEM DECOMMISSION BACKEND "be_host:be_heartbeat_service_port";
For expansion and scaling of BE nodes in multi-tenant deployment environments, please refer to the .
There is no rigid requirement for the number of Broker instances. Usually one physical machine is deployed. Broker addition and deletion can be accomplished by following commands:
Broker is a stateless process that can be started or stopped at will. Of course, when it stops, the job running on it will fail. Just try again.