upstream模块的使用方法

1,使用upstream和server指令来选择上游服务器

这两个指令的语法如下图:

image

示例:

image

2,对上游服务使用keepalive长连接

image

负载均衡策略round-robin

image

  1. 加权Round-Robin算法是其它所有负载均衡算法的基础。
posted on 2019-01-14 16:14  永远的麦子  阅读(1260)  评论(0编辑  收藏  举报