{"id":89711,"date":"2020-07-25T13:42:31","date_gmt":"2020-07-25T11:42:31","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/ustanavlivaem-balansirovshhik-nagruzki-haproxy-na-centos"},"modified":"2020-07-25T13:42:31","modified_gmt":"2020-07-25T11:42:31","slug":"ustanavlivaem-balansirovshhik-nagruzki-haproxy-na-centos","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/ustanavlivaem-balansirovshhik-nagruzki-haproxy-na-centos","title":{"rendered":"Installing the HAProxy load balancer on CentOS","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><strong><em>This article's translation was prepared in anticipation of the course launch <noindex><a rel=\"nofollow\" href=\"https:\/\/otus.pw\/KbNT\/\">Linux Administrator: Virtualization and Clustering<\/a><\/noindex><\/em><\/strong><\/p>\n<p><img decoding=\"async\" alt=\"Installing the HAProxy load balancer on CentOS\" src=\"\/wp-content\/uploads\/2020\/07\/0383023d85d77710b1120e5b896a8433.jpeg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Load balancing is a common solution for horizontally scaling web applications across multiple hosts while providing users with a single access point to the service. <noindex><a rel=\"nofollow\" href=\"http:\/\/www.haproxy.org\/\">HAProxy<\/a><\/noindex> is one of the most popular open-source load balancing programs, which also ensures high availability and proxying functionality.<\/p>\n<p><\/p>\n<p>HAProxy aims to optimize resource utilization, maximize throughput, minimize response times, and avoid overloading any individual resource. It can be installed on a variety of Linux distributions, such as CentOS 8, which we will focus on in this guide, as well as on systems <noindex><a rel=\"nofollow\" href=\"https:\/\/upcloud.com\/community\/tutorials\/haproxy-load-balancer-debian\/\">Debian 8<\/a><\/noindex> and <noindex><a rel=\"nofollow\" href=\"https:\/\/upcloud.com\/community\/tutorials\/haproxy-load-balancer-ubuntu\/\">Ubuntu 16<\/a><\/noindex>.<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Installing the HAProxy load balancer on CentOS\" src=\"\/wp-content\/uploads\/2020\/07\/53bf7d1fa06f06f5d882e573f4984e4f.jpeg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>HAProxy is particularly suitable for websites with very high traffic and is often used to enhance the reliability and performance of web service configurations with multiple servers. This guide outlines the steps to set up HAProxy as a load balancer on a CentOS 8 cloud host, which then directs traffic to your web servers.<\/p>\n<p><\/p>\n<p>As a prerequisite for achieving the best results, you should have at least two web servers and a load balancing server. The web servers should have at least a basic web service running, such as nginx or httpd, to verify load balancing between them.<\/p>\n<p><\/p>\n<h2 id=\"ustanovka-haproxy-na-centos-8\">Installing HAProxy on CentOS 8<\/h2>\n<p><\/p>\n<p>Due to HAProxy being a rapidly evolving open-source application, the version available in the standard CentOS repositories may not be the latest. To check the current version, run the following command:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo yum info haproxy<\/code><\/pre>\n<p><\/p>\n<p>HAProxy always offers three stable versions to choose from: the two most recent supported versions and a third, older one that still receives critical updates. You can always check the latest stable version listed on the HAProxy website and then decide which version you want to work with.<\/p>\n<p><\/p>\n<p>In this guide, we will install the latest stable version 2.0, which was not available in the standard repositories at the time of writing this guide. You will need to install it from the source. But first, ensure that you meet the necessary prerequisites for downloading and compiling the program.<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo yum install gcc pcre-devel tar make -y<\/code><\/pre>\n<p><\/p>\n<p>Download the source code using the command below. You can check if a newer version is available at <noindex><a rel=\"nofollow\" href=\"http:\/\/www.haproxy.org\/#down\">the HAProxy download page<\/a><\/noindex>.<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">wget http:\/\/www.haproxy.org\/download\/2.0\/src\/haproxy-2.0.7.tar.gz -O ~\/haproxy.tar.gz<\/code><\/pre>\n<p><\/p>\n<p>Once the download is complete, extract the files using the command below:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">tar xzvf ~\/haproxy.tar.gz -C ~\/<\/code><\/pre>\n<p><\/p>\n<p>Navigate to the extracted source directory:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">cd ~\/haproxy-2.0.7<\/code><\/pre>\n<p><\/p>\n<p>Then compile the program for your system:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">make TARGET=linux-glibc<\/code><\/pre>\n<p><\/p>\n<p>And finally, install HAProxy itself:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo make install<\/code><\/pre>\n<p><\/p>\n<p>HAProxy is now installed, but it requires some additional configurations to work. Let\u2019s continue setting up the software and services below.<\/p>\n<p><\/p>\n<h2 id=\"nastroyka-haproxy-pod-vash-server\">Configuring HAProxy for your server<\/h2>\n<p><\/p>\n<p>Now add the following directories and statistics file for HAProxy records:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo mkdir -p \/etc\/haproxy\nsudo mkdir -p \/var\/lib\/haproxy \nsudo touch \/var\/lib\/haproxy\/stats<\/code><\/pre>\n<p><\/p>\n<p>Create a symbolic link for the binary files, so you can run HAProxy commands as a regular user:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo ln -s \/usr\/local\/sbin\/haproxy \/usr\/sbin\/haproxy<\/code><\/pre>\n<p><\/p>\n<p>If you want to add the proxy server to the system as a service, copy the haproxy.init file from examples to your \/etc\/init.d directory. Edit the file permissions so that the script is executable, and then reload the systemd daemon:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo cp ~\/haproxy-2.0.7\/examples\/haproxy.init \/etc\/init.d\/haproxy\nsudo chmod 755 \/etc\/init.d\/haproxy\nsudo systemctl daemon-reload<\/code><\/pre>\n<p><\/p>\n<p>You also need to enable the service to start automatically on system startup:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo chkconfig haproxy on<\/code><\/pre>\n<p><\/p>\n<p>For convenience, it is also recommended to add a new user to run HAProxy:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo useradd -r haproxy<\/code><\/pre>\n<p><\/p>\n<p>After this, you can check the installed version number again with the following command:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">haproxy -v\nHA-Proxy version 2.0.7 2019\/09\/27 - https:\/\/haproxy.org\/<\/code><\/pre>\n<p><\/p>\n<p>In our case, the version should be 2.0.7, as shown in the output example above.<\/p>\n<p><\/p>\n<p>Finally, the firewall in CentOS 8 is quite restrictive by default for this project. Use the following commands to allow the necessary services and reload the firewall:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo firewall-cmd --permanent --zone=public --add-service=http\nsudo firewall-cmd --permanent --zone=public --add-port=8181\/tcp\nsudo firewall-cmd --reload<\/code><\/pre>\n<p><\/p>\n<h2 id=\"nastroyka-balansirovschika-nagruzki\">Load Balancer Configuration<\/h2>\n<p><\/p>\n<p>Configuring HAProxy is a relatively straightforward process. Essentially, all you need to do is tell HAProxy which connections it should listen to and where to route them.<\/p>\n<p><\/p>\n<p>This is done by creating a configuration file at \/etc\/haproxy\/haproxy.cfg with the defining settings. You can read about the HAProxy configuration options <noindex><a rel=\"nofollow\" href=\"https:\/\/cbonte.github.io\/haproxy-dconv\/2.0\/configuration.html\">on the documentation page<\/a><\/noindex>, if you want to learn more about it.<\/p>\n<p><\/p>\n<h2 id=\"balansirovka-nagruzki-na-transportnom-urovne-layer-4\">Layer 4 Load Balancing<\/h2>\n<p><\/p>\n<p>Let\u2019s start with a basic setup. Create a new configuration file, for example, using <strong>vi<\/strong> with the command below:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo vi \/etc\/haproxy\/haproxy.cfg<\/code><\/pre>\n<p><\/p>\n<p>Add the following sections to the file. Replace <strong>server_name<\/strong> with what should be calling your servers on the stats page, and <strong>private_ip<\/strong> with the private IP addresses of the servers to which you want to direct web traffic. You can check the private IP addresses <noindex><a rel=\"nofollow\" href=\"https:\/\/hub.upcloud.com\/networks\/private?_ga=2.194047085.1141044831.1595511160-752947894.1595511160\">in the UpCloud control panel<\/a><\/noindex> and on the tab <em>Private Network<\/em> in the menu. <em>Network<\/em>.<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">global\n   log \/dev\/log local0\n   log \/dev\/log local1 notice\n   chroot \/var\/lib\/haproxy\n   stats timeout 30s\n   user haproxy\n   group haproxy\n   daemon\n\ndefaults\n   log global\n   mode http\n   option httplog\n   option dontlognull\n   timeout connect 5000\n   timeout client 50000\n   timeout server 50000\n\nfrontend http_front\n   bind *:80\n   stats uri \/haproxy?stats\n   default_backend http_back\n\nbackend http_back\n   balance roundrobin\n   server server_name1 private_ip1:80 check\n   server server_name2 private_ip2:80 check<\/code><\/pre>\n<p><\/p>\n<p>This defines a layer 4 load balancer with the external name http_front listening on port 80, which then directs traffic to the default backend named http_back. The additional stats \/haproxy?stats connects the stats page at the specified address.<\/p>\n<p><\/p>\n<h2 id=\"razlichnye-algoritmy-balansirovki-nagruzki\">Various Load Balancing Algorithms.<\/h2>\n<p><\/p>\n<p>Specifying servers in the backend section allows HAProxy to use these servers for load balancing based on the round-robin algorithm when possible.<\/p>\n<p><\/p>\n<p>Load balancing algorithms are used to determine which backend server each connection is sent to. Here are some useful options:<\/p>\n<p><\/p>\n<ul>\n<li><strong>Roundrobin:<\/strong> each server is used in turn according to its weight. This is the smoothest and fairest algorithm when processing times across servers remain evenly distributed. This algorithm is dynamic, allowing for server weight adjustment on the fly.<\/li>\n<li><strong>Leastconn:<\/strong> The server with the lowest number of connections is selected. A round-robin method is executed among servers with equal load. It is recommended to use this algorithm for long sessions, such as LDAP, SQL, TSE, etc., but it is not very suitable for short sessions like HTTP.<\/li>\n<li><strong>First:<\/strong> The first server with available slots for connections gets the connection. Servers are selected from the lowest numerical identifier to the highest, which by default corresponds to the server's position in the farm. Once a server reaches the maxconn value, the next server is used.<\/li>\n<li><strong>Source:<\/strong> The source IP address is hashed and divided by the total weight of the running servers to determine which server will receive the request. Thus, the same client IP address will always be routed to the same server while the servers remain unchanged.<\/li>\n<\/ul>\n<p><\/p>\n<h2 id=\"nastroyka-balansirovki-nagruzki-na-prikladnom-urovne-layer-7\">Setting up load balancing at the application level (layer 7)<\/h2>\n<p><\/p>\n<p>Another option available is to set up the load balancer to operate at the application level (layer 7), which is useful when parts of your web application are located on different hosts. This can be achieved by regulating the connection forwarding, for instance, by URL.<\/p>\n<p><\/p>\n<p>Open the HAProxy configuration file with a text editor:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo vi \/etc\/haproxy\/haproxy.cfg<\/code><\/pre>\n<p><\/p>\n<p>Then configure the frontend and backend segments according to the example below:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">frontend http_front\n   bind *:80\n   stats uri \/haproxy?stats\n   acl url_blog path_beg \/blog\n   use_backend blog_back if url_blog\n   default_backend http_back\n\nbackend http_back\n   balance roundrobin\n   server server_name1 private_ip1:80 check\n   server server_name2 private_ip2:80 check\n\nbackend blog_back\n   server server_name3 private_ip3:80 check<\/code><\/pre>\n<p><\/p>\n<p>The frontend declares an ACL rule named url_blog, which applies to all connections with paths starting with \/blog. use_backend specifies that connections matching the url_blog condition should be served by the backend named blog_back, while all other requests are handled by the default backend.<\/p>\n<p><\/p>\n<p>On the backend side, the configuration establishes two server groups: http_back, as before, and a new one called blog_back, which serves connections to example.com\/blog.<\/p>\n<p><\/p>\n<p>After modifying the settings, save the file and restart HAProxy with the following command:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo systemctl restart haproxy<\/code><\/pre>\n<p><\/p>\n<p>If you received any warnings or error messages when starting, check the configuration for them and ensure that you have created all necessary files and folders, then try restarting again.<\/p>\n<p><\/p>\n<h2 id=\"testirovanie-nastroyki\">Testing the Configuration<\/h2>\n<p><\/p>\n<p>Once HAProxy is configured and running, open the public IP address of the load balancer in your browser and verify if you are correctly connected to the backend. The stats uri parameter in the configuration creates a statistics page at the specified address.<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">http:\/\/load_balancer_public_ip\/haproxy?stats<\/code><\/pre>\n<p><\/p>\n<p>When you load the statistics page, if all your servers are displayed in green, the setup was successful!<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Installing the HAProxy load balancer on CentOS\" src=\"\/wp-content\/uploads\/2020\/07\/ce912c5824d0294537b984fe04bdcc8b.jpeg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>The statistics page contains useful information for tracking your web hosts, including uptime\/downtime and session counts. If a server is marked red, ensure that the server is up and that you can ping it from the load balancer machine.<\/p>\n<p><\/p>\n<p>If your load balancer is unresponsive, ensure that HTTP connections are not blocked by a firewall. Also, verify that HAProxy is running using the command below:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo systemctl status haproxy<\/code><\/pre>\n<p><\/p>\n<h2 id=\"zaschita-stranicy-statistiki-s-pomoschyu-parolya\">Protecting the Statistics Page with a Password<\/h2>\n<p><\/p>\n<p>However, if the statistics page is simply exposed at the frontend, it is open for public viewing, which may not be a good idea. Instead, you can assign it its own port number by adding the example below to the end of your haproxy.cfg file. Replace <strong>username<\/strong> and <strong>password<\/strong> with something secure:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">listen stats\n   bind *:8181\n   stats enable\n   stats uri \/\n   stats realm Haproxy Statistics\n   stats auth username:password<\/code><\/pre>\n<p><\/p>\n<p>After adding the new listener group, remove the old reference to stats uri from the frontend group. When finished, save the file and restart HAProxy.<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">sudo systemctl restart haproxy<\/code><\/pre>\n<p><\/p>\n<p>Then reopen the load balancer with the new port number and log in with the username and password you specified in the configuration file.<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">http:\/\/load_balancer_public_ip:8181<\/code><\/pre>\n<p><\/p>\n<p>Ensure that all your servers are still displayed in green, and then open only the IP of the load balancer without any port numbers in your browser.<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">http:\/\/load_balancer_public_ip\/<\/code><\/pre>\n<p><\/p>\n<p>If there is any variety of target pages on your internal servers, you will notice that every time you refresh the page, you receive a response from a different host. You can try different load balancing algorithms in the configuration section or check out the <noindex><a rel=\"nofollow\" href=\"https:\/\/cbonte.github.io\/haproxy-dconv\/\">full documentation<\/a><\/noindex>.<\/p>\n<p><\/p>\n<h2 id=\"zaklyuchenie-balansirovschik-nagruzki-haproxy\">Conclusion: HAProxy Load Balancer<\/h2>\n<p><\/p>\n<p>Congratulations on successfully setting up your HAProxy load balancer! Even with a basic load balancing setup, you can significantly improve the performance and availability of your web application. This guide is only an introduction to load balancing with HAProxy, which is capable of much more than can be described in a brief setup instruction. We recommend experimenting with various configurations using <noindex><a rel=\"nofollow\" href=\"https:\/\/cbonte.github.io\/haproxy-dconv\/2.0\/configuration.html\">extensive documentation<\/a><\/noindex>, available for HAProxy, and then proceed to plan load balancing for your production environment.<\/p>\n<p><\/p>\n<p>Using multiple hosts to safeguard your web service with extra capacity, the load balancer itself can still present a single point of failure. You can further enhance high availability by setting up a floating IP among several load balancers. You can learn more about this in our <noindex><a rel=\"nofollow\" href=\"https:\/\/upcloud.com\/community\/tutorials\/floating-ip-addresses\/\">article on floating IP addresses on UpCloud<\/a><\/noindex>.<\/p>\n<p>Learn more about the course <noindex><a rel=\"nofollow\" href=\"https:\/\/otus.pw\/KbNT\/\">Linux Administrator: Virtualization and Clustering<\/a><\/noindex>***<\/p>\n<p>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/512238\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0432 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430 \u00ab\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 Linux. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f\u00bb \u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u2014 \u044d\u0442\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0445\u043e\u0441\u0442\u0430\u043c \u0441 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0435\u0434\u0438\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443. HAProxy \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0434\u043b\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":89713,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-89711","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0432 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430 \u00ab\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 Linux.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/ustanavlivaem-balansirovshhik-nagruzki-haproxy-na-centos\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 HAProxy \u043d\u0430 CentOS | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0432 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430 \u00ab\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 Linux.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/ustanavlivaem-balansirovshhik-nagruzki-haproxy-na-centos\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-07-25T11:42:31+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-07-25T11:42:31+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Setting up HAProxy Load Balancer on CentOS | ProHoster","description":"The article translation was prepared ahead of the launch of the \"Linux Administrator\" course.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/ustanavlivaem-balansirovshhik-nagruzki-haproxy-na-centos","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 HAProxy \u043d\u0430 CentOS | ProHoster","og:description":"\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0432 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430 \u00ab\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 Linux.","og:url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/ustanavlivaem-balansirovshhik-nagruzki-haproxy-na-centos","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-07-25T11:42:31+00:00","article:modified_time":"2020-07-25T11:42:31+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"89711","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 13:05:27","updated":"2022-10-04 12:00:44","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/89711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=89711"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/89711\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/89713"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=89711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=89711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=89711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}