I have multiple DNS servers at my premise, to provide single up to load balance based on availability I am using Traefik.
the dynamic config to load balancing DNS is
udp:
routers:
router-dns:
entryPoints:
- dns
service: dns-service
services:
dns-service:
loadBalancer:
servers:
- address: "192.168.1.11:5353"
- address: "100.71.28.98:53"
- address: "192.168.1.10:53"
- address: "192.168.1.39:53"
am I doing something wrong ? how can this can be improved so as if 1 of server goes offline other online DNS server should start handling DNS request.
on Traefik I have exposed port 53
This is my static config for traefik
global:
# Send anonymous usage data
sendAnonymousUsage: false
metrics:
prometheus:
addServicesLabels: true
addRoutersLabels: true
buckets:
- 0.1
- 0.3
- 1.2
- 5.0
accessLog:
filePath: "/var/log/access.log"
format: json
bufferingSize: 100
filters:
statusCodes:
- "200"
- "300-302"
retryAttempts: true
minDuration: "10ms"
log:
filePath: "/var/log/traefik.log"
format: json
level: DEBUG
entryPoints:
traefik:
address: ":8081"
web:
address: ":80"
dns:
address: ":53/udp"
tcpdns:
address: ":53/tcp"
https:
address: ":443"
http:
tls: default
api:
insecure: true
dashboard: true
serversTransport:
insecureSkipVerify: true
providers:
file:
directory: "/config/"
watch: true
docker:
endpoint: "unix:///var/run/docker.sock"
watch: true
swarmMode: false
exposedByDefault: false
I am running traefik version is 2.8.3 docker .(not in swarm mode)