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 → ADPG cluster → Services → Balancer → Configuration tab, as described in 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 the Save button and execute the Reconfigure & Restart action. To do this, go back to the Services tab, select the Balancer service, click green arrow and choose Reconfigure & Restart in the displayed list. The Reconfigure & Restart action updates the service configuration files according to the configuration settings and restarts the service.

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