FQDN
Concept Introductionβ
A fully qualified domain name (FQDN) is the full domain name of a specific computer or host on the Internet.
After Doris supports FQDN, you can directly specify the domain name when adding various types of nodes. For example, the command to add a be node is ALTER SYSTEM ADD BACKEND "be_host:heartbeat_service_port
,
"Be_host" was previously the IP address of the be node. After starting the FQDN, be_ The host should specify the domain name of the be node.
Preconditionsβ
- fe.conf file set
enable_fqdn_mode = true
- The fe node can resolve the domain names of all nodes in Doris
Best Practicesβ
Deployment of Doris for K8Sβ
After an accidental restart of a pod, the K8S cannot ensure that the pod's IP address does not change, but it can ensure that the domain name remains unchanged. Based on this feature, when Doris starts fqdn, it can ensure that the pod can still provide services normally after an accidental restart. For the method of deploying Doris on the K8S, please refer to K8s Deployment Doris
Server switching network cardβ
For example, a server with a be node has two network cards with corresponding IPs of 192.192.192.2 and 10.10.10.3. Currently, the network card corresponding to 192.192.192.2 is used, and the following steps can be followed:
- Add a line '192.192.192.2 be1' to the 'etc/hosts' file of the machine where fe is located_ fqdn`
- Change be.conf File
priority_ Networks=192.192.192.2
and start be - Connect and execute the sql command
ALTER SYSTEM ADD BACKEND "be1_fqdn: 9050
When switching to the network card corresponding to 10.10.10.3 in the future, the following steps can be followed:
- Configure '192.192.192.2 be1' for 'etc/hosts'_ Fqdn 'is changed to' 10.10.10.3 be1_ fqdn`
Legacy Cluster Enable FQDNβ
Prerequisite: The current program supports the 'ALTER SYSTEM MODIFY FRONT "<fe_ip>:<edit_log_port>" HOSTNAME "<fe_hostname>" syntax, If not, you need to upgrade to a version that supports this syntax
Next, follow the steps below:
-
Perform the following operations on the follower and observer nodes one by one (finally, operate the master node):
- Stop the node
- Check if the node is stopped. Execute 'show frontends' on the MySQL client to view the Alive status of the FE node until it becomes false
- Set FQDN for node:
ALTER SYSTEM MODIFY FRONTEND "<fe_ip>:<edit_log_port>" HOSTNAME "<fe_hostname>"
- Modify the node configuration. Modify the 'conf/fe. conf' file in the FE root directory and add the configuration: 'enable'_ fqdn_ mode = true`
- Start the node.
-
To enable FQDN for a BE node, you only need to execute the following commands through MYSQL, and there is no need to restart the BE.
ALTER SYSTEM MODIFY BACKEND "<backend_ip>:<backend_port>" HOSTNAME "<be_hostname>"