如何负载平衡Haproxy背后的DNS服务器



我正在尝试在3台主机上运行的DNS服务器的负载平衡,我这样做只是为了学习,而不是为了负载平衡DNS服务器,而是为了自学。

这就是Haproxy配置:

global
maxconn 4096
defaults
mode http
timeout connect 5s
timeout client 50s
timeout server 50s
listen http-in
bind *:7953
server rockpi  192.168.5.15:5335
server oukitel.local  192.168.5.18:5335
server localhost 192.168.5.28:5335
stats enable
stats uri /haproxy
stats refresh 5s

但当我尝试使用haproxyip进行挖掘时,它似乎不起作用:

$ dig yahoo.com @192.168.5.28 -p 7953
; <<>> DiG 9.16.1-Ubuntu <<>> yahoo.com @192.168.5.238 -p 7953
;; global options: +cmd
;; connection timed out; no servers could be reached

HAProxy是TCP/HTTP负载均衡器,不支持UDP。

最新更新