美文网首页Nginx
NGINX UDP 负载均衡

NGINX UDP 负载均衡

作者: lo踏风 | 来源:发表于2017-06-22 15:14 被阅读512次

    udp的负载需要使用nginx的stream模块,请实现检查是否已经安装

    具体配置文件:

    udp的负载需要使用nginx的stream模块,请实现检查是否已经安装
    具体配置文件:
    # Load balance UDP-based DNS traffic across two servers
    stream {
     upstream dns_upstreams {
     server 192.168.136.130:53;
     server 192.168.136.131:53;
     }
    
     server {
     listen 53 udp; #表明是udp
     proxy_pass dns_upstreams;
     proxy_timeout 1s;
     proxy_responses 1;
     error_log logs/dns.log;
     }
    }
    

    相关文章

      网友评论

        本文标题:NGINX UDP 负载均衡

        本文链接:https://www.haomeiwen.com/subject/bmjfcxtx.html