08-07-2019 07:13 AM
I have configured one A Record with 3 different IPs,
I need to know what is the algorithm used by NIOS when a user is resolving www.company.com :
will it be balanced ?
is it Random ?
In My case DNS server returns the same IP 80% of the time, which is the first IP entered.
Solved! Go to Solution.
08-07-2019 07:53 AM
You can't configure one A record with 3 different IPs. Each A record has exactly one IP.
So you either configured:
a) 3 A records, each with the same name but with different IPs
b) one host record containing 3 IPs
However, for both a) and b) the default behaviour is round-robin, so distribution should be 1/3 for each of the three IPs.
Are you 100% sure there were no other queries to the server in between your queries ? The round-robin distribution is a total distribution across ALL queries received on the DNS server. It is not a per-client round-robin distribution.
So for proper testing/verification you'll have to ensure you are the only client sending queries to that DNS server at that time.
You can also setup different distribution/ordering schemes as per:
08-07-2019 11:35 AM
Yes I have 3 A Records same name and different IPs.
The document talks only about host record "Enable setting RRset order for hosts with multiple addresses"
Does it apply to simple A Records ?
Do I have to Add host with 3 IPs instead of 3 A Records with same name and multipe IPs ?
08-09-2019 12:47 AM
that setting probably only applies to Host records. Not sure what the algorithm is if you setup 3 A records for the same label, like you did.
I did a quick test and 3 individial A records as well as a host record with three IPs showed the same behaviour. The answers were always round-robin so for 9 queries sent I got 3 replies with each of the three IPs on top of the list, so exactly the expected result of 1/3.
When you are testing, are you actually sending your test queries to the authoritative DNS server for the zone ? Or are you using a local cache/resolver ? If you are using a local cache then that cache might use another distribution scheme, so you should make sure to test against the auth server directly.