Reducing the DNS Lookup Time

Discussion in 'Domain names / DNS' started by Will1968, Oct 21, 2011.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi,

    Would having my website domain name registered directly with DASP rather than say 1and1 (with DNS forwarding to DASP) reduce the lookup time or the overall page load time?

    It is currently as follows ...

    IP: 89.187.101.71
    Location: Slough, United Kingdom*
    Error/Status Code: 200
    Start Offset: 0.001 s
    DNS Lookup: 238 ms
    Initial Connection: 51 ms
    Time to First Byte: 106 ms
    Content Download: 161 ms
    Bytes In (downloaded): 8.2 KB
    Bytes Out (uploaded): 0.3 KB

    Not sure if this is good or bad?

    A competitor gets as follows ...

    IP: 213.219.23.112
    Location: United Kingdom*
    Error/Status Code: 200
    Start Offset: 0.003 s
    DNS Lookup: 88 ms
    Initial Connection: 59 ms
    Time to First Byte: 88 ms
    Content Download: 131 ms
    Bytes In (downloaded): 7.6 KB
    Bytes Out (uploaded): 0.3 KB

    Thanks,

    Will
     
  2. Before a browser can establish a network connection to a web server, it must resolve the DNS name of the web server to an IP address. Since DNS resolutions can be cached by the client's browser and operating system, if a valid record is still available in the client's cache, there is no latency introduced. However, if the client needs to perform a DNS lookup over the network, the latency can vary greatly depending on the proximity of a DNS name server that can provide a valid response. All ISPs have DNS servers which cache name-IP mappings from authoritative name servers; however, if the caching DNS server's record has expired, and needs to be refreshed, it may need to traverse several nodes in the DNS serving hierarchy, sometimes around the globe, to find an authoritative server. If the DNS resolvers are under load, they can queue DNS resolution requests, which further adds to the latency. In other words, in theory, DNS resolution takes 1 RTT to complete, but in practice, the latency can vary significantly due to DNS resolver queuing delays. It's therefore important to reduce DNS lookups more than any other kinds of requests.

    The validity of a DNS record is determined by the time-to-live (TTL) value set by its primary authoritative server; many network administrators set the TTL to very low (between 5 minutes and 24 hours) to allow for quick updates in case network traffic needs to be shifted around. (However, many DNS caches, including browsers, are "TTL disobeyers" and keep the cached record for longer than instructed by the origin server, up to 30 minutes in some cases.) There are a number of ways to mitigate DNS lookup time — such as increasing your DNS records' time-to-live setting, minimizing CNAME records (which require additional lookups), replicating your name servers in multiple regions, and so on — but these go beyond the scope of web application development, and may not be feasible given your site's network traffic management requirements.

    Instead, the best way to limit DNS-lookup latency from your application is to minimize the number of different DNS lookups that the client needs to make, especially lookups that delay the initial loading of the page. The way to do that is to minimize the number of different hostnames from which resources need to be downloaded. However, because there are benefits from using multiple hostnames to induce parallel downloads, this depends somewhat on the number of resources served per page. The optimal number is somewhere between 1 and 5 hosts (1 main host plus 4 hosts on which to parallelize cacheable resources). As a rule of thumb, you shouldn't use more than 1 host for fewer than 6 resources; fewer than 2 resources on a single host is especially wasteful. It should never be necessary to use more than 5 hosts (not counting hosts serving resources over which you have no control, such as ads).


    http://code.google.com/speed/page-speed/docs/rtt.html
     
  3. mjp

    mjp

    Depends on what you mean by "forwarding." Do you name servers point to us or 1&1?
     
  4. Many thanks.

    Just to clarify ...

    My domain name is registered with 1and 1 and the Named Server Settings are pointing to ns1.discountasp.net, ns2.discountasp.net and ns3.discountasp.net.

    Would it be more efficient to register my domain with DASP?

    Thanks,

    Will
     
  5. Can you just clarify ...

    So is it more efficient to register my domain with DASP?

    I wasn't sure if I fully understood how what Google said related to where my domain name was registered.

    Thanks,

    Will
     
  6. mjp

    mjp

    Will, no, it makes no difference where your domain name is registered. What's important is where your name servers point, and ns1.discountasp.net, ns2.discountasp.net and ns3.discountasp.net is correct.

    The DNS lookup is typically cached by the local ISPs, which makes a lookup fast. But all DNS records expire after a given amount of time, and if the record has expired and your ISP is no longer caching it, then the lookup will take longer, since your ISP has to communicate with the authoritative DNS server (us) before returning a result.

    That's why you see varying times for DNS resolution. And that is also why DNS for a popular site will almost always be returned more quickly - because the cache is frequently updated.
     
  7. Thanks, fully understood.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page