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
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:22.214.171.124) Gecko/20071127 Firefox/126.96.36.199 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:188.8.131.52) Gecko/20071127 Firefox/184.108.40.206 Hi, 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. Thanks James Reproducible: Always Steps to Reproduce: In order to test this I have setup a series of test DNS entries called firefoxtest1, firefoxtest2, etc.: firefoxtest1.squish.net A 220.127.116.11 A 10.123.123.1 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. Specifically: http://firefoxtest1.squish.net/ Will return either: Standard query response A 18.104.22.168 A 10.123.123.1 or Standard query response A 10.123.123.1 A 22.214.171.124 (as shown by Wireshark TCP capture) If firefox receives the 10.123.123.1 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.).
Status: UNCONFIRMED → RESOLVED
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.