How to configure HAPROXY into the environment

 

HAProxy (which stands for High Availability Proxy) is a fast and reliable open-source solution, which is able to handle huge traffic and offers high availability, load balancing, and proxying for TCP and HTTP-based applications. Similar to Nginx-Balancer, it uses a single-process, event-driven model, which consumes a low (and stable) amount of memory, enabling HAProxy to process a large number of concurrent requests simultaneously, ensuring smooth load-balancing with smart persistence and DDOS mitigation.

HAProxy is focused on ensuring advanced load balancing by providing a huge array of tools and supported features to make it as fast, efficient (in RAM and CPU usage particularly) and stable as possible. Here are some key possibilities that HAProxy offers:

 

 

Creating Environment:

1.Login to the CloudJiffy Dashboard

2. Click on New Environment.

 


 

3. Within any programming language, you can activate the HAProxy load balancer server. Create Environment and click on Create.

4. Environment Created.

 

HAProxy Configuration

As it was mentioned above, HAProxy is provided with the integrated admin panel, which can be accessed by clicking the Open in Browser button ( haproxy open in browser ) and adding the /haproxy_adm_panel suffix to the environment URL in the browser address bar. After that, you just need to specify the balancer credentials (sent to you via email) in the appeared pop-up authentication frame.

 

 

 

 

 

In the opened page you can see the list of your HAProxy balancer(s) and servers they are working with. Besides that, every instance is supplied with detailed information on queues, sessions, warnings and errors, check-up information, and more. Some configuration actions can be done using the drop-down just under the tables.

 

Besides that, you can specify some additional settings in the following ways:

 

  1. Through the dashboard by editing the conf > haproxy.conf main configuration file.

 

Here, you can also link the application servers to your balancer (even from other environments) to be placed behind it. Just add the corresponding record to the backend bk_http section in the following format:

server webserver{n} {server_intenal_ip}:80 cookie S{n} check

where the values inside the curly brackets should be substituted with your custom ones:

  • {n} - preferred identifier of the linking server
  • {server_internal_ip} - address of the required server, which can be found through selecting the Additionally button next to it

Once these configurations are done, Save the made changes and Restart the load-balancer server to apply them.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 9484