Updated on 2024-05-29 GMT+08:00

Introduction to Doris HA

Clients that support the MySQL protocol can be connected to the Doris cluster through FE nodes. To avoid single points of failure (SPOFs), multiple FE nodes are used and ELB instances are deployed on these nodes to ensure high availability of Doris.

You can configure Doris HA use any of the following methods base on your needs:

  • Write code on the service side.
  • Use an SDK.
  • Configure an ELB instance.

Writing Code on the Service Side

At the service application layer, write code to test the connection and balance loads. If a connection is interrupted, the connection is automatically set up on other FEs for retry. To retry the connection, you need to make intrusive modification of addresses of multiple Doris FE nodes.

Using an SDK

The MySQL protocol is used to connect to Doris. SDKs of some languages have provided high availability. For example, MySQL JDBC can use the automatic retry mechanism. When establishing a connection, set the data source as follows:

jdbc:mysql:loadbalance://[host1][:port],[host2][:port][,[host3][:port]]...[/[database]][?propertyName1=propertyValue1[&propertyName2=propertyValue2]...]

For details, see https://dev.mysql.com/doc/connector-j/en/connector-j-usagenotes-j2ee-concepts-managing-load-balanced-connections.html.

Configuring an ELB Instance

Doris uses the ELB-based deployment architecture to automatically distribute user access traffic to multiple backend nodes, expanding service capabilities to external systems and improving fault tolerance. When a backend Doris node becomes faulty, ELB automatically fails over access traffic to another properly running node. For details, see Accessing Doris Through ELB.