HAProxy

HAProxy

HAProxy (High Availability Proxy) is a fast and reliable open-source load balancer for TCP- and HTTP-based applications. It uses a single-process, event-driven model to handle large numbers of concurrent requests with low and stable memory consumption.

HAProxy Features

HAProxy is designed for advanced and efficient load balancing with a broad set of built-in tools and features.

Backend health checksPeriodically checks backend application servers and helps avoid routing traffic to unavailable instances.
Advanced loggingSupports detailed and customizable request and balancing logs.
halogIncludes the HAProxy log analyzer utility for processing and reviewing log data.
HTTP/1.1Provides full HTTP/1.1 support on both client and server sides.
Web interfaceIncludes a graphical administration panel with load-balancing statistics.
System initialization: the HAProxy template uses the modern systemd initialization daemon.

HAProxy Deployment

  1. Log in to your PaaS account.
  2. Click New environment in the upper-left corner of the dashboard.
New environment button
Create a new environment from the dashboard.
  1. In the topology wizard, select HAProxy in the Balancing section.
  2. Select the required application servers and any other nodes for the environment.
  3. Allocate the required resources to each layer.
  4. Enter an environment name, for example haproxy, and click Create.
HAProxy in environment wizard
Select HAProxy from the Balancing section and configure the remaining environment nodes.

The environment is created within a few minutes, placing HAProxy in front of the application layer.

Environment with HAProxy created
HAProxy is deployed in front of the application servers.

HAProxy Admin Panel

HAProxy includes an integrated administration panel. Click Open in Browser for the HAProxy node and append the following suffix to the environment URL:

/haproxy_adm_panel

Enter the HAProxy credentials sent by email when the authentication dialog appears.

HAProxy admin panel
The HAProxy administration panel shows balancers, backend servers, queues, sessions, errors, health checks, and other statistics.

The administration page provides information about HAProxy instances and their backend servers, including queues, sessions, warnings, errors, and health-check data. Some actions are also available through the drop-down controls below the statistics tables.

HAProxy Configuration

HAProxy settings can be changed directly through the dashboard by editing the main configuration file:

conf > haproxy.conf
HAProxy configuration file
Edit the main haproxy.conf file through the dashboard configuration manager.

Link Application Servers from Other Environments

Application servers from other environments can also be linked behind the HAProxy load balancer. Add a record to the backend bk_http section using this format:

server webserver{n} {server_internal_ip}:80 cookie S{n} check
{n}Your preferred identifier for the linked backend server.
{server_internal_ip}The internal IP address of the required application server. It can be found through the server’s Additionally menu.

Save the updated configuration and restart the HAProxy node to apply the changes.

Configure HAProxy via SSH

HAProxy can also be managed by connecting to the required load-balancer node through the platform SSH Gateway.

HAProxy SSH access
Use the platform SSH Gateway for command-line access to the HAProxy node.

Expected Result

HAProxy is deployed in front of the selected application servers and distributes incoming TCP or HTTP traffic between them. The integrated administration panel provides runtime statistics, while configuration can be managed through haproxy.conf or SSH.

Important Notes

  • HAProxy can work with any application server and other platform instances.
  • The integrated admin panel is available at /haproxy_adm_panel.
  • Admin-panel credentials are sent by email.
  • The main configuration file is conf > haproxy.conf.
  • Application servers from other environments can be linked manually through the backend bk_http section.
  • Restart HAProxy after saving configuration changes.
  • HAProxy can also be accessed through the platform SSH Gateway.