Configure load balancing

The load balancing feature is available for ADPG Enterprise Edition.

The ADPG cluster implements load balancing, which distributes client requests across multiple database hosts. For more information on this functionality, see Load balancing.

The Balancer service performs balancing. To configure it, go to the Clusters page, select an ADPG cluster, and switch to the Services tab. Click the Balancer service and expand HAProxy configurations node on the Primary configuration tab (see Configure services).

Settings of the Balancer service
Settings of the Balancer service

With the default settings, only the leader node processes write requests, and read only requests are passed to replicas. You can also allow the leader to handle read only transactions. To do this, activate the leader as replica checkbox.

The leader_port option specifies a port on the host with the HAProxy component for write transactions. The default value is 6432.

The replica_port option sets a port on the host with the HAProxy component for read only transactions. The default value is 6433.

The balancer_stats_port option defines a port on which a web page with a HAProxy statistics report is available. The default value is 7000.

After you change the settings, click Save and execute the Reconfigure & Restart action. The Reconfigure & Restart action updates the service configuration files according to the configuration settings and restarts the service.

Run Reconfigure and Restart
Run Reconfigure & Restart
Found a mistake? Seleсt text and press Ctrl+Enter to report it