If you ever run into a situation where you have deployed an AJAX web application onto multiple servers using round robin DNS and find you are getting
horrible performance on Windows and Linux is running great, check your DNS!!
This has bit me a few times and figured it might save someone a ton of aggravation. Here is the scenario. Two web application servers each have their own "A" record in the DNS server. When the browser tries to connect to the web server, it asks the DNS servers for the IP addresses resolved from the host/domain name.
If, for whatever reason, one of the servers is unavailable, Windows does not always do what you would expect. Here's what was happening to me.
In Linux, any browser I tried would connect to the web server. If it was unavailable, it would try the next one. So far, so good. Any AJAX requests are technically building new connections. I don't know if it simply discarded the down server first or tried it the first time, but once it was aware the first server was down, it
ALWAYS sent the AJAX requests to the second server.
Windows does something really bad. It was trying on
every AJAX request to reach the first, unavailable server. Once it timed out, it would bounce to the second. But it was doing that for each and every AJAX request! This was problematic as the web application we were using was of a high speed variety.
Because I knew I was going to have the first server down for an extended period of time, I removed it's "A" record from DNS. This is not enough for the Windows boxes to behave again. You have to flush the DNS resolver cache. Get yourself a command line and do this:
ipconfig /flushdns
Now, the Windows computer will operate the way you would originally expect it to.
Craig Deering
Network Engineer
Astro Shapes, Inc. -
Aluminum ExtrusionsWebsite -
http://www.astroshapes.com