Closed Bug 412259 Opened 13 years ago Closed 13 years ago

Firefox doesn't remember web servers are down for sites with multiple A records in DNS


(Core :: Networking, defect)

Windows XP
Not set





(Reporter: james, Unassigned)


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071127 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071127 Firefox/


Firefox has an issue when it comes to dealing with web sites with multiple A records (aka round robin DNS) where one of the servers is down: it doesn't remember.

Firefox appears to go through each IP address that is returned by the DNS server in the order that the DNS server responded and tries each in turn, waiting 20 seconds between each one.  Eventually, Firefox will correctly find the first working web site from the list of IP addresses, and fetch the page from it.

The problem is that Firefox does not remember what the working IP address was, and always starts from scratch on each web request.  This means that if the DNS server responded with a set of IP addresses and the first one corresponds to a web server that is down, Firefox always has a 20 second delay on every new http connection.

Internet Explorer on the other hand will "stick" to the working IP address until it detects a failure.  Internet Explorer therefore appears much more responsive and deals better with web server failures where multiple IP addresses are returned.



Reproducible: Always

Steps to Reproduce:
In order to test this I have setup a series of test DNS entries called firefoxtest1, firefoxtest2, etc.: A

The 62.x address is my web server, the 10.x address has nothing there so will time out.

When you go to this address in Firefox, my DNS server (bind) will return the addresses in a random order.


Will return either:

	Standard query response A A
	Standard query response A A

(as shown by Wireshark TCP capture)

If firefox receives the address in the list first, there will be a 20 second delay, as expected.

If you then wait around 10-15 seconds (or monitor your TCP connections with netstat) for the  keepalive connection to finish, and then hit refresh or click on the link in the page, you will see a subsequent 20 seconds wait.

A TCP capture with Wireshark reveals that Firefox always uses the DNS list in the order the DNS server returned it and always starts from the beginning and doesn't remember the working address.  Thus, it always incurs a 20 second penalty for each new http connection.

As I mentioned previously, you can try the same test with Internet Explorer and although it will have a 20 second wait to start with, it will remember the working IP address and therefore subsequent refreshes or page clicks will be returned without delay.

Actual Results:  
20 second delay on initial request.
20 second delay on all future requests via refresh or page click.

Expected Results:  
20 second delay on initial request.
No delay on future requests.

A lot of big names use multiple A records for web sites and the delay being introduced could affect a lot of people in different circumstances (failed web servers, maintenance cycles, etc.).
Closed: 13 years ago
Component: General → Networking
Product: Firefox → Core
Resolution: --- → DUPLICATE
Duplicate of bug: 392953
You need to log in before you can comment on or make changes to this bug.