In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Nginx_upstream load balancing & highly available load balancing scheduling algorithm: upstream duanserver {server 192.168.4.41 weight=1 max_fails=3 fail_timeout=10s; server 192.168.4.42 weight=2 max_fails=3 fail_timeout=10s; 80 weight=2 max_fails=3 fail_timeout=10s;} server {listen 80; server_name www.xxx.com; root / usr/local/nginx/html; location / {root html; index index.html index.htm Proxy_pass http://duanserver; # backend service experienced the following error condition and failed over (can be automatically cut off & switched back) Proxy_next_upstream http_403 http_404 http_500 http_502 http_503 error timeout invalid_header; include / usr/local/nginx/conf/proxy.conf;} error_page 500 502 503 504 / 50x.htl; location = / 50x.html {root html;}}
Polling: requests are allocated one by one, and back-end outages are automatically eliminated.
Weight: weight polling
Ip_hash: assigned according to the source IP hash result, the same IP visitor regularly visits a back-end server to solve the session sharing problem of dynamic web pages.
Fair: intelligent algorithm (intelligent selection according to page size & loading time, priority allocation of short back-end processing time), need to load upstream_fair module, high consumption performance
Url_hash: access url hash result allocation, and each url is permanently directed to a backend server to improve backend efficiency (nginx hash package needs to be loaded)
Define the status of the backend server:
Down: do not participate in the load
Backup: reserved machine, (enabled when all non-backup failures or busy)
Max_fails: allow the number of failed requests
Failtimeout: after maxfails failures, suspend the service time and use it together
When scheduling algorithm ip_hash, the state cannot be backup & weight
Any question, please contact me!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.