- Use the stable bind server
docker run -d --rm --name=bind9 internetsystemsconsortium/bind9:9.18
- Exec into the container
docker exec -it bind9 bash
- Install dnsutils
apt-get update && apt-get install dnsutils
- Generate a large zone (use the existing db.local for localhost)
cd /etc/bind
for i in $( seq 1 255); do
for j in $( seq 1 255); do
for k in $( seq 1 255); do
echo "test IN A 10.$i.$j.$k" >> db.local
done
done
done
cp db.local /
- Test with different number of records
root@fc239df9d6e8:/etc/bind# head -n 2000 /db.local > db.local
root@fc239df9d6e8:/etc/bind# kill -HUP 1
root@fc239df9d6e8:/etc/bind# dig test.localhost @localhost | wc
2006 10012 79144
root@fc239df9d6e8:/etc/bind# head -n 3000 /db.local > db.local
root@fc239df9d6e8:/etc/bind# kill -HUP 1
root@fc239df9d6e8:/etc/bind# dig test.localhost @localhost | wc
3006 15012 119402
root@fc239df9d6e8:/etc/bind# head -n 4000 /db.local > db.local
root@fc239df9d6e8:/etc/bind# kill -HUP 1
root@fc239df9d6e8:/etc/bind# dig test.localhost @localhost | wc
4006 20012 159970
root@fc239df9d6e8:/etc/bind# head -n 5000 /db.local > db.local
root@fc239df9d6e8:/etc/bind# kill -HUP 1
root@fc239df9d6e8:/etc/bind# dig test.localhost @localhost | wc
19 85 585
# 5000 fails
root@fc239df9d6e8:/etc/bind# head -n 4100 /db.local > db.local
root@fc239df9d6e8:/etc/bind# kill -HUP 1
root@fc239df9d6e8:/etc/bind# dig test.localhost @localhost | wc
4106 20512 164060
# 4300 fails
root@fc239df9d6e8:/etc/bind# head -n 4300 /db.local > db.local
root@fc239df9d6e8:/etc/bind# kill -HUP 1
root@fc239df9d6e8:/etc/bind# dig test.localhost @localhost | wc
19 85 585
...
root@fc239df9d6e8:/etc/bind# head -n 4107 /db.local > db.local
root@fc239df9d6e8:/etc/bind# kill -HUP 1
root@fc239df9d6e8:/etc/bind# dig test.localhost @localhost | wc
19 85 585
root@fc239df9d6e8:/etc/bind# head -n 4106 /db.local > db.local
root@fc239df9d6e8:/etc/bind# kill -HUP 1
root@fc239df9d6e8:/etc/bind# dig test.localhost @localhost | wc
4112 20542 164296
grep test db.local | wc
4091 16364 135051
Max number of IPs for the same A record seems to be 4091
The bind daemon fails with the following error