Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a web-application that I'm testing the frontend performane using looks like YSlow and http://www.webpagetest.org/

One of the things I notice the most is that the time to perform the DNS lookup on my web-site is huge (hundreds of milliseconds).

However, if I use these tools to test Yahoo, Google, Microsoft, etc - the DNS lookup time is near 0.

Question: What might be causing my DNS lookup time to be so large?

UPDATE:

I found that Yahoo states that DNS lookup is typically 20-120 ms; however, for my website - it's closer to 350 ms. Any ideas why my DNS lookup is so much longer that what Yahoo typically experiences?

share|improve this question

migrated from stackoverflow.com Nov 29 '10 at 18:20

This question came from our site for professional and enthusiast programmers.

    
What's your domain? Have you tried checking it against any DNS diagnostic sites such as dnscog.com? –  Gerald Combs Nov 29 '10 at 18:58

4 Answers 4

A significant geographical difference between your server and your computer? Maybe the DNS servers that your ISP provides are slow. I found that after I changed my DNS server )on my computer) to Google's my DNS searches were always blazing fast. Try it yourself: http://code.google.com/speed/public-dns/

share|improve this answer
    
Wouldn't that require each of my clients/users who connect to my web-site to also change their DNS to use Googles public DNS? I was hoping I could do on my server to results in faster results for all of my clients/users without them having to do anything. –  Anonymous Nov 29 '10 at 5:04
    
The geographical distance wouldn't make much difference. Once the initial lookup is done, the local DNS will cache the result. Subsequent lookups should be very fast. –  Matt Nov 29 '10 at 20:44
    
That is true, but if he is using a host such as rackspace or amazon (US based) and he is outside of the US, the connection to the server will be quite high latency and still seem slow. I also have a feeling that by "DNS Lookup" he may actually be referring to a ping. –  user61832 Dec 3 '10 at 9:11

Yahoo, Google, and Microsoft (etc.) are extremely popular websites for which tons of DNS requests are made every second. DNS is heavily cached, so that the most-requested lookups are made less expensive. Therefore, DNS lookups for popular sites are much more likely to be served from a cache — therefore faster — be it your ISP, your home router, or your browser.

How popular is your site?

share|improve this answer
    
That has nothing to do with it. All DNS traffic is cached usually until the TTL on the record expires. It's probably misconfiguration or SLOW DNS cache. Most broadband routers have DNS caches in them that can sometimes be slower than directly using the ISP DNS cache. –  Matt Nov 29 '10 at 20:46

If you are having troubles from your PC to lookup your website then your machine's DNS must be slow. As recommended by someone below, try changing your DNS to google's DNS and see if that works. If it works, then your ISP DNS must be currently scavenging records or doing Zone transfers or they may be doing some maintenance. The result of that test doesn't mean your users will have to change their DNS as well.

share|improve this answer

This is most likely a local problem. Check what primary and secondary DNS sources your computer is using.

It can sometimes be caused by misconfiguration too.
e.g. a wrong IP for a primary dns but secondary OK. Or, just a slow server.

If you can't see anything wrong, try your testing on another broadband connection elsewhere. You might just find that it's actually quite fast.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.