Nginx 参数官方文档:http://nginx.org/en/docs/http/ngx_http_upstream_module.html

常用 Upstream 参数

参数 描述
service 反向服务地址 加端口
weight 权重
max_fails 失败多少次 认为主机已挂掉则,踢出
fail_timeout 踢出后重新探测时间
backup 备用服务
max_conns 允许最大连接数
slow_start 当节点恢复,不立即加入

 

 

 

 

 

 

 

 

 

 

service

  每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除 配置如下 

upstream server_qd{
        server 127.0.0.1:8072 weight=2 ;
        server 127.0.0.1:8096 weight=4;
    }
View Code

相关文章:

  • 2021-10-11
  • 2022-01-02
  • 2021-11-29
  • 2021-08-21
  • 2022-12-23
  • 2022-03-11
  • 2022-12-23
  • 2021-11-12
猜你喜欢
  • 2021-07-07
  • 2022-02-11
  • 2021-11-11
  • 2022-02-10
  • 2021-04-30
  • 2021-10-25
  • 2022-01-16
相关资源
相似解决方案