There may be some caching on one end or the other (or both). I would
think the DNS server at least would want to have the same response for
the same query from the same host to minimize overhead. Do you have
the ability to run your test on a bunch of hosts simultaneously?

On Tue, Sep 11, 2012 at 10:03 AM, Robert Citek <[email protected]> wrote:
> host appears to give similar results:
>
> $ seq 1 10 | xargs -i host -v google.com | grep ^Recei | grep -o
> 8.8.[0-9.#]* | uniq -c
>      30 8.8.8.8#53
>
> As for the strace, can you give an example of what I should be looking for?
>
> Regards,
> - Robert
>
> On Tue, Sep 11, 2012 at 10:09 AM, Andrew Freiberger
> <[email protected]> wrote:
>> my guess is that "dig" is not set to use the resolv libraries, but instead
>> figures out a nameserver using the resolv.conf file and then goes about it's
>> own business.  If you did a "strace" on the "host <dns name>" command, I
>> wonder if you'd see the resolver flip-flopping in your socket connections.
>>
>> -Drew
>>
>> On Tue, Sep 11, 2012 at 8:49 AM, Robert Citek <[email protected]>
>> wrote:
>>>
>>> I am puzzled by the rotate option in /etc/resolv.conf.  From the man page:
>>>
>>>     rotate
>>> sets RES_ROTATE in _res.options, which causes round robin selection of
>>> nameservers from among those listed. This has the effect of spreading
>>> the query load among all listed servers, rather than having all
>>> clients try the first listed server first every time.
>>>
>>> $ cat /etc/resolv.conf
>>> options rotate
>>> nameserver 8.8.8.8
>>> nameserver 8.8.4.4
>>>
>>> However if I run multiple tests with dig, I always hit the same
>>> server, the first server:
>>>
>>> $ seq 1 100 | xargs dig +noall +stats google.com | grep SERVER | uniq -c
>>>     101 ;; SERVER: 8.8.8.8#53(8.8.8.8)
>>>
>>> To demonstrate, if I swap the position of the first and second nameserver:
>>>
>>> $ cat /etc/resolv.conf
>>> options rotate
>>> nameserver 8.8.4.4
>>> nameserver 8.8.8.8
>>>
>>> And rerun the test:
>>>
>>> $ seq 1 100 | xargs dig +noall +stats google.com | grep SERVER | uniq -c
>>>     101 ;; SERVER: 8.8.4.4#53(8.8.4.4)
>>>
>>>
>>> That does not look like round-robin.  What am I missing?
>>>
>>> Regards,
>>> - Robert
>>> _______________________________________________
>>> Discuss mailing list
>>> [email protected]
>>> http://www.sluug.org/mailman/listinfo/discuss
>>
>>
>>
>> _______________________________________________
>> Discuss mailing list
>> [email protected]
>> http://www.sluug.org/mailman/listinfo/discuss
>>
>
> --
> Central West End Linux Users Group (via Google Groups)
> Main page: http://www.cwelug.org
> To post: [email protected]
> To subscribe: [email protected]
> To unsubscribe: [email protected]
> More options: http://groups.google.com/group/cwelug



-- 
David Dooling

-- 
Central West End Linux Users Group (via Google Groups)
Main page: http://www.cwelug.org
To post: [email protected]
To subscribe: [email protected]
To unsubscribe: [email protected]
More options: http://groups.google.com/group/cwelug

Reply via email to