1748129 Members
3684 Online
108758 Solutions
New Discussion юеВ

Re: DNS with 2 servers

 
Wim Van den Wyngaert
Honored Contributor

DNS with 2 servers

Just sharing my finding. VMS 7.3 with TCP 5.3 eco 2.

When you use BIND DNS with multiple servers, it will wait the configured 'timeout' seconds before contacting the next specifified server.

On my site timeout was 4 seconds. To improve failover, I changed it to 1 and increased the retries.

Note that a program can decide to overrule this timeout.

Fwiw

Wim
Wim
3 REPLIES 3
John Gillings
Honored Contributor

Re: DNS with 2 servers

Wim,

>it will wait the configured 'timeout'
>seconds before contacting the next
>specifified server.

Are you surprised? That's how DNS works on all systems. How could it be any other way?

Beware. Reducing the timeout too far can cause problems of its own. Consider, if it were a universally good idea to have a 1 second timeout, that would be the default! The people who define these things aren't completely stupid.
A crucible of informative mistakes
Wim Van den Wyngaert
Honored Contributor

Re: DNS with 2 servers

John,

May be the 4 seconds is default value of long time ago.

Note that with 1 second and retries enabled, it will switch between the 2 addreses while retrying.

Note that ucx help set nam/time suggest that it would take 1 minutes to timeout. This is not correct because with 1 address it took 90 seconds on my config (after 1 minute it tried again after 64, 72 and 88 seconds.

I'm even surprised that values smaller than 1 second are not allowed.

Wim

Wim
Wim Van den Wyngaert
Honored Contributor

Re: DNS with 2 servers

Did a test to see how it reacts with 2 DNS servers that are down. Timeout is 1, tries is 6.

I will show offset in seconds and to which server the DNS request is Xmitted.

0 X1
1 X2
2 X1
3 X2
4 X1
6 X2
8 X1
12 X2
16 X1
24 X2
32 X1
48 X2

64 X1
65 X2
66 X1
67 X2
68 X1
70 X2
72 X1
76 X2
80 X1
86 X2
94 X1
110 X2
End.

As you can see, after 1 second the retransmit was done to the failover. Then the doubling the timeout continued for the X1. Exactly between every 2 X1, an X2 is done. Until the 7th retry. And then it restarts but not with exactly the same timings.

IMO a better solution than the default one (network with nodes maximum 10 km appart, no internet).
The default reacted as
0 X1
4 X2
8 X1
12 X2
...

Fwiw

Wim
Wim