nginx.conf

...
stream {
    proxy_timeout 1d;
        proxy_connect_timeout 30;
include tcp/*.conf;
}
...

tcp/tcp_instance.conf

upstream redis_ha {
        server 172.16.0.10:30011;
        server 172.16.0.11:30011;
        server 172.16.0.17:30011;
        server 172.16.0.120:30011;
        server 172.16.0.3:30011;
        hash $remote_addr consistent;
}

server {
        listen 30011;
        proxy_connect_timeout 28800;
        proxy_timeout 86400;
        proxy_pass redis_ha;
}

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code