Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Haproxy polling server set

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report