Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Firefox (tech question) => How are Multiple A-Records handled (failover)?

352 views
Skip to first unread message

Jens Mueller

unread,
Jan 13, 2011, 5:33:25 AM1/13/11
to support...@lists.mozilla.org
Hello,

I would be thankfull for answering my technical question (or redirecting me
to another list where I can ask this question):

DNS allows to have multiple A-Records for a Hostname. How exactly does
Firefox handle multiple A-Records. Given the DNS Entry looks like this

myexample.com (Host)
1.1.1.1 (A Record)
1.1.1.2 (A Record)
1.1.1.3 (A Record)

My Questions:

1.) Firefox will first "query the DNS for the hostname myexample" when I
enter it in the adress-bar. Will Firefox internall store (on Windows, *nix)
all available A-Records. Or will Firefox only query and/or receive one
single A-Record?

2.) Does Firefox, in case multiple A-Records are return, test them on
speed/availability (most likely not)

3.) Does Firefox "failvoer" to another A-Record in case the A-Record choosen
first does not work. So for example Firefox uses 1.1.1.1 for a minute and
then the server breaks. Now the next request to 1.1.1.1 will fail. Does then
Firefox switch to any of the other A-Records and use them? (Will firefox try
all IP Adresses available or only a limmited number (in case there are
hundreds of A-Records available)?)

4.) What is the Timeout Value for Firefox to switch to another A-Record if
the current fails (in case this is supported)?

5.) When was this failover logic implemented in Firefox, in which version
(in case it is supported)?

6.) Is there any further documentation about this failover process availble?


Thank you very much!!
jens

Fox on the run

unread,
Jan 13, 2011, 5:50:15 AM1/13/11
to

In Windows - to display your locally stored DNS records:
ipconfig/displaydns
(from http://www.ehow.com/how_2252931_display-contents-dns-cache.html)

JB

Jens Mueller

unread,
Jan 14, 2011, 4:00:33 AM1/14/11
to Firefox help community
Hello,

Thanks for your answer JB. It's true what you have written, but it only
adresses a very tiny part of my questions.

Is this list the right list for my questions. Which other (more technical)
List could I send my question to, or could someone else please help me anser
the questions?

thanks
jens

2011/1/13 Fox on the run <jjrbo...@gmail.com>

> _______________________________________________
> support-firefox mailing list
> support...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/support-firefox
> To unsubscribe, send an email to
> support-fir...@lists.mozilla.org?subject=unsubscribe
>

Herman Viaene

unread,
Jan 14, 2011, 11:52:50 AM1/14/11
to
Jens Mueller wrote:

As far as I know, has Firefox nothing to do with your problem, it is the
networking software of your Operating System (Windows or?????) which handles
DNS. So you might have more success in other groups specific for your
Operating System

Herman Viaene

Message has been deleted

jo...@recompute.com.au

unread,
Aug 11, 2013, 8:25:05 PM8/11/13
to
On Saturday, 15 January 2011 03:52:50 UTC+11, Herman Viaene wrote:
> As far as I know, has Firefox nothing to do with your problem, it is the
> networking software of your Operating System (Windows or?????) which handles
> DNS. So you might have more success in other groups specific for your
> Operating System
>
> Herman Viaene

Hi Herman,

Actually, the application has a big role to play in determining how to deal with multiple A records and un-responsive hosts.

Jens asked a very valid question (a couple of years ago) and it's a shame there were no decent responses on this forum. Jens, if you're still interested, here is a good discussion on the matter:
https://bugzilla.mozilla.org/show_bug.cgi?id=641937

For background on what exactly goes on between the client application and the operating system's DNS resolver, the POSIX functions getaddrinfo() and gethostbyname() are relevant.

getaddrinfo() returns a struct addrinfo which has the following member:

struct addrinfo {
...
struct addrinfo *ai_next;
}

This gives it a list structure so that the client application will be able to receive the information of all the A records specified in the DNS.

The older, and now obsolescent, function gethostbyname() returns a struct hostent which looks something like this:

struct hostent {
...
char **h_addr_list; /* list of addresses */
}

Again, the client has access to a _list_ of addresses.

The point of the above is to illustrate that in fact while the operating system usually handles DNS resolving, the application does get all of the A records specified for a host and is therefore free to use them as it pleases. In other words, making Jens' question a very valid and interesting one.

References:
I got the information on the functions and structures from the relevant man pages on my Linux system.
man getaddrinfo
man gethostbyname

Cheers,

John
0 new messages