配置Nginx反向代理负载均衡服务器

准备:
Proxy-Server:1.1.1.22(负载均衡服务器)
Nginx-Server23:1.1.1.23(web23)
Nginx-Server24:1.1.1.24(web24)
环境版本:

Linux Nginx-Proxy 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
①:安装配置完成Nginx,具体可以参考:http://note.t4x.org/system/centos-nginx-spdy/
WEB服务器预配置:


负载均衡服务器配置:

备注:server 1.1.1.23:80 weight=20; 等同于 server 1.1.1.23:80 weight=20 max_fails=1 fail_timeout=10s;
测试:

备注:当其中一台WebServer宕机以后,大概需要约10s后此台服务器将被剔除。
参考:http://nginx.org/en/docs/http/ngx_http_upstream_module.html
参考:http://tengine.taobao.org/document_cn/http_upstream_consistent_hash_cn.html文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/configure-nginx-proxy-server-load-balance/ 文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/configure-nginx-proxy-server-load-balance/

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!

 
Byrd
  • by Published onOctober 18, 2014
  • 原文链接:https://note.t4x.org/system/configure-nginx-proxy-server-load-balance/
匿名

Comment

Anonymous

Slide puzzle verification.