Best practices for website acceleration-reducing DNS Lookup

Source: Internet
Author: User

Refer:
Http://developer.yahoo.com/performance/rules.html#dns_lookups

 

DNS
Just like the phone book, search for the specified website's
IP
Address. Search once
DNS
Generally
20-120
Milliseconds.

 

The Domain Name System (DNS) maps hostnames to IP
Addresses, just as phonebooks map people's names to their phone numbers. When
You type www.yahoo.com into your browser, a DNS resolver contacted by
Browser returns that server's IP address. DNS has a cost. It typically takes 20-120
Milliseconds for DNS to lookup the IP address for a given hostname.
The
Browser can't download anything from this hostname until the DNS lookup is
Completed.


 

DNS cache can improve performance. The DNS cache can occur on the cache server and is maintained by the ISP or local LAN. DNS information cache is also available in the personal computer operating system. Also, most browsers have their own DNS caches.


DNS lookups are cached for better performance. This caching
Can occur on a special caching server, maintained by the user's ISP or local
Area Network, but there is also caching that occurs on the individual user's
Computer. The DNS information remains in the operating system's DNS cache (
"DNS Client Service" on Microsoft Windows). Most browsers have their
Own caches, separate from the operating system's cache. As long as the browser
Keeps a DNS record in its own cache, it doesn' t bother the Operating System
With a request for the record.

 

By default, Internet Explorer keeps the DNS cache for 30 minutes, Firefox keeps the cache for 1 minute by default, and fasterfox keeps the cache for 1 hour.


Internet Explorer caches DNS lookups for 30 minutes
Default, as specified byDnsCacheTimeout
Registry setting.
Firefox caches DNS lookups for 1 minute, controlled bynetwork.dnsCacheExpiration
Configuration Setting. (fasterfox changes this to 1 hour .)

When the client's DNS cache is empty (for both the browser
And the operating system), the number of DNS lookups is equal to the number
Unique hostnames in the web page. This includes des the hostnames used in
Page's URL, images, script files, stylesheets, flash objects, etc. cing the number of unique
Hostnames reduces the number of DNS lookups
.

 

 

Reducing DNS lookup can shorten the response time, but reducing the number of concurrent downloads may increase the response time.


Cing the number of unique hostnames has the potential
To reduce the amount of parallel downloading that takes place in the page. Avoiding DNS lookups cuts
Response times, but downcing parallel downloads may increase response times. My
Guideline is to split these components into SS at least two but no more
Four hostnames.
This results in a good compromise between cing DNS
Lookups and allowing a high degree of parallel downloads.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.