Get the App
SLTechnology News&Howtos  ›  Servers  › 

Haproxy polling server set

Shulou Source: shulou.com Published: 2022-06-02 15:34:52 12月01日 Update

Haproxy cluster Haproxy polling cluster can poll not only the transport layer, but also the application layer services. Set up Haproxy cluster # yum-y install haproxy1) Monitoring port service [haproxy:50] # vim / etc/haproxy/haproxy.cfgfrontend description accept client listening socket frontend web *: 80 default_backend appbackend description forwarding link server set backend appbackend roundrobin server app1 192.168.4.53 check server app1 80 check server app1 192.168.4.52 check # service haproxy start # elinks-dump http://192 .168.4.502) forwards to different server sets for different web pages frontend web *: 80 acl url_html path_end-I .html set policy Detects the end of the url, ending with. html, and the policy name is url_html use_backend html_group if url_html if it is a url_html policy Then transfer it to html_group server set acl url_php path_end-I. php use_backend php_group if url_php default_backend html_group backend html_group balance roundrobin server web51 192.168.4.51 check server web52 check server web52 192.168.4.52 check backend php_group balance roundrobin server Web53 192.168.4.53 url 80 check server web54 192.168.4.54 url 80 check so that you can access the html page or the php page according to the end of the html.

Tags: Services servers different policies clusters pages knotting customers clients Application layer Terminal Port Link Transport Application Detection Monitoring Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Redmi macOS Linux vpn