HAProxy
HAProxy, short for High Availability Proxy, is a powerful open-source solution known for its speed and reliability. It excels in handling substantial traffic loads and provides high availability, load balancing, and proxying for both TCP and HTTP-based applications. Like Nginx-Balancer, HAProxy operates on a single-process, event-driven model, resulting in low and stable memory consumption. This architecture allows HAProxy to efficiently process numerous concurrent requests, ensuring seamless load balancing with intelligent persistence and DDOS mitigation capabilities.
HAProxy is dedicated to delivering advanced load-balancing capabilities by offering a wide range of tools and supported features aimed at maximizing speed, efficiency (especially in RAM and CPU usage), and stability. Here are some key possibilities that HAProxy offers:
- Periodical check-up of backend servers
- Advanced and customizable logging capabilities
- Powerful log analyzer tool (halog)
- Full HTTP 1.1 support on both server and client sides
- Graphical web interface with detailed work statistics
Note: This template utilizes the modern systemd initialization daemon.
To get your own HAProxy load balancer server on the platform, follow these steps:
HAProxy Deployment
Step 1. Log in to your AccuWeb.Cloud account.
Step 2. Click the “New Environment” button in the upper left corner of the dashboard.
Step 3. Load balancers work with any application server(s) and all other instances. So, choose HAProxy within the Balancing section of the wizard using the corresponding drop-down list (as shown in the image below):
Next, choose the additional nodes required for your environment and allocate the desired amount of resources for each. Lastly, provide a name for your environment and click on the “Create” button.
Step 4. Your environment will be created in a few minutes.
You’ve successfully installed the HAProxy load balancer, ready to manage traffic for your application. Feel free to begin using it right away or customize its settings to suit your specific requirements.
HAProxy Configurations
As mentioned earlier, HAProxy comes with an integrated admin panel. You can access it by clicking the “Open in Browser” button and adding the /haproxy_adm_panel suffix to the environment URL in your browser’s address bar.
Then, simply enter the balancer credentials (sent to you via email) in the authentication pop-up that appears.
On the opened page, you’ll find a list of your HAProxy balancers along with the servers they’re currently managing. Each instance provides detailed insights into queues, sessions, warnings, errors, health check information, and more. You can also perform configuration actions using the drop-down menu located below the tables.
Furthermore, you can specify additional settings in the following ways:
Step 1. Through the dashboard by editing the haproxy.cfg (/etc/haproxy/haproxy.cfg) main configuration file.
In this section, you can connect your application servers to the balancer, even if they’re from different environments, to position them behind it. Simply add the appropriate record to the backend bk_http section in the following format:
server webserver{n} {server_intenal_ip}:80 check cookie S{n}
Replace the values inside the curly brackets with your custom ones:
{n} – preferred identifier of the linking server
{server_internal_ip} – address of the required server, which can be found by selecting the “Additionally” button next to it
Once you’ve completed these configurations, remember to save the changes and restart the load balancer server to apply them.
Step 2. To access the relevant HAProxy node through the platform SSH Gateway:
We hope you’ll find working with HAProxy enjoyable and take full advantage of its powerful GUI to maximize management capabilities on the platform.