{"id":340059,"date":"2022-10-21T15:00:11","date_gmt":"2022-10-21T15:00:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=340059"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=340059","title":{"rendered":"<span>\u041a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a HAProxy \u043d\u0430 Ubuntu 20.04<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0443\u0436\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0443 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0435\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a HAProxy \u0434\u043b\u044f \u0432\u0435\u0431-\u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0434\u0432\u0443\u0445 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 HAProxy?<\/h2>\n<p>HAProxy \u2014 \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \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. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u043b\u0438 \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u00ab\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e\u00bb \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u041f\u041e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0434\u0430\u0435\u0442 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0441\u0430\u0439\u0442\u0430, \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c TCP \u0438 HTTP.\u00a0HAProxy \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443, \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0418\u0422-\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u043a\u0430\u043a Twitter, Instagram, Avito, DevianArt, Github, \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. <\/p>\n<h2>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c HAProxy, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0430\u0448\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c:<\/p>\n<ul>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u2014 \u0434\u0432\u0430 \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u0440\u0435\u0442\u0438\u0439 \u2014 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 HAProxy;<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0441 \u0410-\u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438, \u00ab\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438\u00bb \u043d\u0430 IP \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430;<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u0435\u043d \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445.<\/p>\n<\/li>\n<\/ul>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0442\u0438  <\/h2>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 HAProxy, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u043d\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0435\u0442\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0438\u043c\u0435\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. <\/p>\n<p>\u041f\u043e\u0448\u0430\u0433\u043e\u0432\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u0435\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Serverspace. \u0414\u0432\u0430 \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u00ab\u0431\u044d\u043a\u0435\u043d\u0434\u00bb, \u0442\u0440\u0435\u0442\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c HAProxy. \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0430\u044f\u0441\u044f \u00ab\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u0430\u044f\u00bb \u0441\u0445\u0435\u043c\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u043d\u0438\u0436\u0435.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/657\/278\/3b7\/6572783b7c48bf134d154bad816f4654.png\" width=\"1305\" height=\"505\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/657\/278\/3b7\/6572783b7c48bf134d154bad816f4654.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b\u044b\u00a0<em>\/etc\/hosts<\/em>\u00a0\u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u0442\u0440\u0435\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0441\u0442\u0440\u043e\u043a\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u00ab\u0441\u0432\u044f\u0437\u0430\u0442\u044c\u00bb IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u0417\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043e\u0442\u043a\u0440\u044b\u0432 SSH-\u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043d\u0430 haproxy-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e ICMP-\u043f\u0430\u043a\u0435\u0442\u043e\u0432 <br \/>\u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u044b;<\/p>\n<\/li>\n<\/ul>\n<pre><code>cat &lt;&lt;EOF >> \/etc\/hosts &lt;backend_server_one_IP> &lt;backend_server_one_hostname> &lt;backend_server_two_IP> &lt;backend_server_two_hostname> &lt;haproxy_server_IP> &lt;haproxy_server_hostname> EOF<\/code><\/pre>\n<pre><code>ping &lt;LAN_servers_IPs>&lt;lan_servers_ips>&lt;\/lan_servers_ips><\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/464\/47d\/984\/46447d98442eadc79a70c34543b29c13.png\" width=\"556\" height=\"386\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/464\/47d\/984\/46447d98442eadc79a70c34543b29c13.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440\u0430, \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0435\u0435 \u0432\u0435\u0441\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u044b, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0441 haproxy. \u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u044b\u043c, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 IP. \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u2014 \u0437\u0430\u0439\u0442\u0438 \u0432 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 Serverspace, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443\u00a0<strong>SAVE<\/strong>. \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c \u0432\u044b\u0448\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u044e\u0449\u0438\u0445, \u0438\u043d\u0430\u0447\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ebf\/985\/4f3\/ebf9854f3982a91a71777b5835abca25.png\" width=\"937\" height=\"278\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ebf\/985\/4f3\/ebf9854f3982a91a71777b5835abca25.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430<\/h2>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u0432\u044b \u0432\u043d\u0435\u0441\u043b\u0438 \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441 \u0432 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a, \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u0430\u043c\u0438 \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0432\u0435\u0431-\u043f\u0430\u043d\u0435\u043b\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, HestiaCP. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u043d\u0435\u043b\u044c \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u00ab\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u044b\u0439\u00bb \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e\u00a0<a href=\"https:\/\/serverspace.ru\/support\/help\/ustanovka-paneli-hestiacp-na-server-pod-ubuntu-20\/\">\u0437\u0434\u0435\u0441\u044c<\/a>, \u0437\u0430\u0442\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u0432 \u043f\u0430\u043d\u0435\u043b\u0438 \u0438, \u043a\u043b\u0438\u043a\u043d\u0443\u0432 \u043d\u0430\u00a0<strong>Users > Add user<\/strong>, \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u0435\u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f;<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1c9\/2d3\/fec\/1c92d3fecdef29bc7dc31736c42e7704.png\" width=\"1075\" height=\"936\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1c9\/2d3\/fec\/1c92d3fecdef29bc7dc31736c42e7704.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0441 \u00ab\u043f\u043e\u043d\u0438\u0436\u0435\u043d\u043d\u044b\u043c\u0438\u00bb \u043f\u0440\u0430\u0432\u0430\u043c\u0438;<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/787\/259\/50e\/78725950e3423d16052f9ff79d3b7d8f.png\" width=\"1153\" height=\"463\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/787\/259\/50e\/78725950e3423d16052f9ff79d3b7d8f.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442 \u0447\u0435\u0440\u0435\u0437 \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438;<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/062\/8c0\/619\/0628c0619e9429d013c56e807b062b95.png\" width=\"1153\" height=\"463\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/062\/8c0\/619\/0628c0619e9429d013c56e807b062b95.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a05\/1f2\/d88\/a051f2d880f092cc8dd665ef5b49ae4f.png\" width=\"1153\" height=\"463\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a05\/1f2\/d88\/a051f2d880f092cc8dd665ef5b49ae4f.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c\u00a0 \u00ab\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u043e\u043c\u00bb \u0441\u0435\u0440\u0432\u0435\u0440\u0435;<\/p>\n<\/li>\n<\/ul>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 HAProxy<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430:<\/p>\n<ul>\n<li>\n<p>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u0432 SSH-\u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 HAProxy, \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b;<\/p>\n<\/li>\n<\/ul>\n<pre><code>apt-get update; apt upgrade -y<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/39b\/89c\/193\/39b89c193801a9a71c32a4c57d57f173.png\" width=\"431\" height=\"104\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/39b\/89c\/193\/39b89c193801a9a71c32a4c57d57f173.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430;<\/p>\n<\/li>\n<\/ul>\n<pre><code>apt-get install haproxy -y<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b31\/86e\/8c3\/b3186e8c3002e00fb7d35a9ab7b19edc.png\" width=\"1388\" height=\"535\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b31\/86e\/8c3\/b3186e8c3002e00fb7d35a9ab7b19edc.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b HAProxy, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438;<\/p>\n<\/li>\n<\/ul>\n<pre><code>&lt;span>frontend haproxy_web&lt;\/span> &lt;span>&amp;nbsp; bind &lt;IP_\u0441\u0435\u0440\u0432\u0435\u0440\u0430_haproxy>:80&lt;\/span> &lt;span>&amp;nbsp; default_backend web_back&lt;\/span> mode http &lt;span>backend web_back&lt;\/span> &lt;span>&amp;nbsp; balance roundrobin&lt;\/span> server &lt;hostname_\u043f\u0435\u0440\u0432\u043e\u0433\u043e_\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u043e\u0433\u043e_\u0441\u0435\u0440\u0432\u0435\u0440\u0430> &lt;IP_\u043f\u0435\u0440\u0432\u043e\u0433\u043e_\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u043e\u0433\u043e_\u0441\u0435\u0440\u0432\u0435\u0440\u0430>:80 server &lt;hostname_\u0432\u0442\u043e\u0440\u043e\u0433\u043e_\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u043e\u0433\u043e_\u0441\u0435\u0440\u0432\u0435\u0440\u0430> &lt;IP_\u0432\u0442\u043e\u0440\u043e\u0433\u043e_\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u043e\u0433\u043e_\u0441\u0435\u0440\u0432\u0435\u0440\u0430>:80<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4fc\/def\/b2d\/4fcdefb2d458c50de6d96eef8bbb030f.png\" width=\"849\" height=\"646\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4fc\/def\/b2d\/4fcdefb2d458c50de6d96eef8bbb030f.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u043b\u0443\u0436\u0431\u0443 HAProxy \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435;<\/p>\n<\/li>\n<\/ul>\n<pre><code>service haproxy start; systemctl enable haproxy<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e68\/7bd\/4b8\/e687bd4b8902f5c67b4a73de98721046.png\" width=\"849\" height=\"192\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e68\/7bd\/4b8\/e687bd4b8902f5c67b4a73de98721046.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430<\/h2>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0430\u0439\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041e\u043d \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u043d\u043e \u0432\u044b \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u044b \u0432 \u0448\u0442\u0430\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\n<p>\u0412\u043e\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 SSH, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u0443\u0439\u0442\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439 \u0444\u0430\u0439\u043b;<\/p>\n<\/li>\n<\/ul>\n<pre><code>cd &lt;\u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439_\u043a\u0430\u0442\u0430\u043b\u043e\u0433_\u0441\u0430\u0439\u0442\u0430> mv &lt;\u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439_\u0444\u0430\u0439\u043b> &lt;\u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439_\u0444\u0430\u0439\u043b.bkp><\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/657\/b4d\/8f8\/657b4d8f82a60a54ece671c429ef948c.png\" width=\"637\" height=\"122\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/657\/b4d\/8f8\/657b4d8f82a60a54ece671c429ef948c.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430;<\/p>\n<\/li>\n<\/ul>\n<pre><code>echo $(hostname) > &lt;\u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439_\u0444\u0430\u0439\u043b><\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/72d\/646\/98a\/72d64698acfe03a488cf03da271acf6f.png\" width=\"637\" height=\"122\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/72d\/646\/98a\/72d64698acfe03a488cf03da271acf6f.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u0442\u0443 \u0436\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0441\u0432\u043e\u0439 \u0441\u0430\u0439\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0437\u0430\u0442\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0412\u0441\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442;<\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c67\/928\/ce9\/c67928ce9cfd0c31b650afe0282b350f.png\" width=\"468\" height=\"176\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c67\/928\/ce9\/c67928ce9cfd0c31b650afe0282b350f.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/27b\/8ef\/376\/27b8ef376f3ecc4343d95c4bda5a02f8.png\" width=\"468\" height=\"176\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/27b\/8ef\/376\/27b8ef376f3ecc4343d95c4bda5a02f8.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0412\u0435\u0440\u043d\u0438\u0442\u0435 \u00ab\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435\u00bb \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u00ab\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u044b\u0445\u00bb \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445:<\/p>\n<\/li>\n<\/ul>\n<pre><code>rm &lt;index file> mv &lt;\u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439_\u0444\u0430\u0439\u043b.bkp> &lt;\u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439_\u0444\u0430\u0439\u043b><\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b4d\/d78\/246\/b4dd78246e03becb1ac06a2b059dd97c.png\" width=\"641\" height=\"176\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b4d\/d78\/246\/b4dd78246e03becb1ac06a2b059dd97c.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/414\/a6f\/2e0\/414a6f2e04628fc78854ecede68f0491.png\" width=\"641\" height=\"176\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/414\/a6f\/2e0\/414a6f2e04628fc78854ecede68f0491.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u044b \u0443\u0437\u043d\u0430\u043b\u0438, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 HAProxy, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Ubuntu 20.04.  <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/serverspace\/blog\/694770\/\"> https:\/\/habr.com\/ru\/company\/serverspace\/blog\/694770\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0443\u0436\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0443 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0435\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a HAProxy \u0434\u043b\u044f \u0432\u0435\u0431-\u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0434\u0432\u0443\u0445 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 HAProxy?<\/h2>\n<p>HAProxy \u2014 \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \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. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u043b\u0438 \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u00ab\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e\u00bb \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u041f\u041e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0434\u0430\u0435\u0442 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0441\u0430\u0439\u0442\u0430, \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c TCP \u0438 HTTP.\u00a0HAProxy \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443, \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0418\u0422-\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u043a\u0430\u043a Twitter, Instagram, Avito, DevianArt, Github, \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. <\/p>\n<h2>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c HAProxy, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0430\u0448\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c:<\/p>\n<ul>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u2014 \u0434\u0432\u0430 \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u0440\u0435\u0442\u0438\u0439 \u2014 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 HAProxy;<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0441 \u0410-\u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438, \u00ab\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438\u00bb \u043d\u0430 IP \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430;<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u0435\u043d \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445.<\/p>\n<\/li>\n<\/ul>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0442\u0438  <\/h2>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 HAProxy, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u043d\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0435\u0442\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0438\u043c\u0435\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. <\/p>\n<p>\u041f\u043e\u0448\u0430\u0433\u043e\u0432\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u0435\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Serverspace. \u0414\u0432\u0430 \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u00ab\u0431\u044d\u043a\u0435\u043d\u0434\u00bb, \u0442\u0440\u0435\u0442\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c HAProxy. \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0430\u044f\u0441\u044f \u00ab\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u0430\u044f\u00bb \u0441\u0445\u0435\u043c\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u043d\u0438\u0436\u0435.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b\u044b\u00a0<em>\/etc\/hosts<\/em>\u00a0\u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u0442\u0440\u0435\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0441\u0442\u0440\u043e\u043a\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u00ab\u0441\u0432\u044f\u0437\u0430\u0442\u044c\u00bb IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u0417\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043e\u0442\u043a\u0440\u044b\u0432 SSH-\u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043d\u0430 haproxy-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e ICMP-\u043f\u0430\u043a\u0435\u0442\u043e\u0432 <br \/>\u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u044b;<\/p>\n<\/li>\n<\/ul>\n<pre><code>cat &lt;&lt;EOF >> \/etc\/hosts &lt;backend_server_one_IP> &lt;backend_server_one_hostname> &lt;backend_server_two_IP> &lt;backend_server_two_hostname> &lt;haproxy_server_IP> &lt;haproxy_server_hostname> EOF<\/code><\/pre>\n<pre><code>ping &lt;LAN_servers_IPs>&lt;lan_servers_ips>&lt;\/lan_servers_ips><\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440\u0430, \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0435\u0435 \u0432\u0435\u0441\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u044b, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0441 haproxy. \u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u044b\u043c, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 IP. \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u2014 \u0437\u0430\u0439\u0442\u0438 \u0432 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 Serverspace, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443\u00a0<strong>SAVE<\/strong>. \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c \u0432\u044b\u0448\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u044e\u0449\u0438\u0445, \u0438\u043d\u0430\u0447\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430<\/h2>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u0432\u044b \u0432\u043d\u0435\u0441\u043b\u0438 \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441 \u0432 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a, \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u0430\u043c\u0438 \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0432\u0435\u0431-\u043f\u0430\u043d\u0435\u043b\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, HestiaCP. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u043d\u0435\u043b\u044c \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u00ab\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u044b\u0439\u00bb \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e\u00a0<a href=\"https:\/\/serverspace.ru\/support\/help\/ustanovka-paneli-hestiacp-na-server-pod-ubuntu-20\/\">\u0437\u0434\u0435\u0441\u044c<\/a>, \u0437\u0430\u0442\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u0432 \u043f\u0430\u043d\u0435\u043b\u0438 \u0438, \u043a\u043b\u0438\u043a\u043d\u0443\u0432 \u043d\u0430\u00a0<strong>Users > Add user<\/strong>, \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u0435\u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f;<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0441 \u00ab\u043f\u043e\u043d\u0438\u0436\u0435\u043d\u043d\u044b\u043c\u0438\u00bb \u043f\u0440\u0430\u0432\u0430\u043c\u0438;<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442 \u0447\u0435\u0440\u0435\u0437 \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438;<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c\u00a0 \u00ab\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u043e\u043c\u00bb \u0441\u0435\u0440\u0432\u0435\u0440\u0435;<\/p>\n<\/li>\n<\/ul>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 HAProxy<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430:<\/p>\n<ul>\n<li>\n<p>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u0432 SSH-\u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 HAProxy, \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b;<\/p>\n<\/li>\n<\/ul>\n<pre><code>apt-get update; apt upgrade -y<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430;<\/p>\n<\/li>\n<\/ul>\n<pre><code>apt-get install haproxy -y<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b HAProxy, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438;<\/p>\n<\/li>\n<\/ul>\n<pre><code>&lt;span>frontend haproxy_web&lt;\/span> &lt;span>&amp;nbsp; bind &lt;IP_\u0441\u0435\u0440\u0432\u0435\u0440\u0430_haproxy>:80&lt;\/span> &lt;span>&amp;nbsp; default_backend web_back&lt;\/span> mode http &lt;span>backend web_back&lt;\/span> &lt;span>&amp;nbsp; balance roundrobin&lt;\/span> server &lt;hostname_\u043f\u0435\u0440\u0432\u043e\u0433\u043e_\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u043e\u0433\u043e_\u0441\u0435\u0440\u0432\u0435\u0440\u0430> &lt;IP_\u043f\u0435\u0440\u0432\u043e\u0433\u043e_\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u043e\u0433\u043e_\u0441\u0435\u0440\u0432\u0435\u0440\u0430>:80 server &lt;hostname_\u0432\u0442\u043e\u0440\u043e\u0433\u043e_\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u043e\u0433\u043e_\u0441\u0435\u0440\u0432\u0435\u0440\u0430> &lt;IP_\u0432\u0442\u043e\u0440\u043e\u0433\u043e_\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u043e\u0433\u043e_\u0441\u0435\u0440\u0432\u0435\u0440\u0430>:80<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u043b\u0443\u0436\u0431\u0443 HAProxy \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435;<\/p>\n<\/li>\n<\/ul>\n<pre><code>service haproxy start; systemctl enable haproxy<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430<\/h2>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0430\u0439\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041e\u043d \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u043d\u043e \u0432\u044b \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u044b \u0432 \u0448\u0442\u0430\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\n<p>\u0412\u043e\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 SSH, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u0443\u0439\u0442\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439 \u0444\u0430\u0439\u043b;<\/p>\n<\/li>\n<\/ul>\n<pre><code>cd &lt;\u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439_\u043a\u0430\u0442\u0430\u043b\u043e\u0433_\u0441\u0430\u0439\u0442\u0430> mv &lt;\u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439_\u0444\u0430\u0439\u043b> &lt;\u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439_\u0444\u0430\u0439\u043b.bkp><\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430;<\/p>\n<\/li>\n<\/ul>\n<pre><code>echo $(hostname) > &lt;\u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439_\u0444\u0430\u0439\u043b><\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u0442\u0443 \u0436\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0441\u0432\u043e\u0439 \u0441\u0430\u0439\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0437\u0430\u0442\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0412\u0441\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442;<\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u0412\u0435\u0440\u043d\u0438\u0442\u0435 \u00ab\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435\u00bb \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u00ab\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043d\u044b\u0445\u00bb \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445:<\/p>\n<\/li>\n<\/ul>\n<pre><code>rm &lt;index file> mv &lt;\u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439_\u0444\u0430\u0439\u043b.bkp> &lt;\u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439_\u0444\u0430\u0439\u043b><\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u044b \u0443\u0437\u043d\u0430\u043b\u0438, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 HAProxy, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Ubuntu 20.04.  <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/serverspace\/blog\/694770\/\"> https:\/\/habr.com\/ru\/company\/serverspace\/blog\/694770\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-340059","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/340059","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=340059"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/340059\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=340059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=340059"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=340059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}