Nacos - 通过Nginx 为nacos 集群做负载均衡
1、如何搭建 nacos 集群
请参考 :
Nacos - 通过Docker 部署nacos 的集群版本 3实例
https://blog.csdn.net/qq_15071263/article/details/103374272
2、配置nginx
需要nginx 支持stream 模块
在nginx 配置文件的根节点下,增加stream 配置
# stream 模块 用户自定义
stream{
upstream nacos {
server localhost:65210 weight=1 max_fails=2 fail_timeout=10s;
server localhost:65211 weight=1 max_fails=2 fail_timeout