SpringCloudGate 集群配合nginx配置服务网关负载均衡
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
upstream gatewayserver{
server 127.0.0.1:8851 weight=1;
server 127.0.0.1:8852 weight=1;
server 127.0.0.1:8853 weight=1;
}
server {
listen 80;
server_name gateway.cluster;
location / {
proxy_pass http://gatewayserver/;
}
}
}