I noticed recently that my macbook was having issues communicating with certain websites. One site was a management portal for a customer and another was the entire suite of apache.org websites. Since I’m using the apache projects on a daily basis, not being able to access these websites is a major issue.
The behavior that I was seeing was that certain web pages would take over a minute to load each time. However, almost every other aspect of networking was working just fine. So I started to dig in more on what was going on. The issue started at approximately the same time that I had turned on encryption for my wireless network, so this was an obvious first suspect. I tried for sometime to see if there was anything on the web dealing with speed issues with WPA, but didn’t come across anything that was relevant.
A ping of tomcat.apache.org was showing that DNS resolved immediately and that there was a decent ping time of ~100ms. However, trying to load the page at http://tomcat.apache.org still took minutes.
My next test was to try to telnet to tomcat.apache.org port 80 to see how that performed. What was odd was that like the webpage, this took quite some time. As it was processing though, I noticed that it was trying to connect to an ipv6 address instead of the ipv4 address that was reported by ping.
So as a test I went into the OSX System Preferences > Network and tried disabling ipv6 networking. Immediately, all of the pages that were having issues were snappy again.