MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
WebPagetest Forums - Super fast dns resolution times

WebPagetest Forums

Full Version: Super fast dns resolution times
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The site in this report seems to have blisteringly fast dns resolution times. How do they do it?
Their DNS Lookup Time is 30-109 milliseconds as reported by PHP's curl in my Test Routines.

PHP Code:
$dnsTime curl_getinfo($chCURLINFO_NAMELOOKUP_TIME); 

This number reported by my testing routines are fairly consistent.

These number are for the just the index page no other page elements.

Routine #1,

Base Page Size: 15,848 Bytes
Transmission Speed: 367,550 Bytes/Sec.
Compression: Your Web server is NOT Compressing HTML
HTML Whitespace: 1.0%
Bytes Transmitted: 15,848 Bytes
HTML Transfer Rate: 367,550 Bytes/Sec.

Resolve Domain Name: 0.109 Sec.
Connect Time: 0.152
Transfer Time: 0.043 Sec.
Generate HTML: 0.044 Sec.
Total Time: 0.239 Sec.

Server Transfer Rate: 373,363 Bytes/Sec.
Data Transfer Rate: 373,363 Bytes/Sec. (No gzip compression)
Packet Transfer Rate: 83,426 Bytes/Sec. (includes overhead of pre-first byte time)

Resolve Domain Name: 60.180 mS.
Connect Time: 42.943 mS.
Wait on Server: 43.839 mS.
Pretranfer time: 103.123 mS.
Time To First Byte Time: 146.962 mS.
Transfer Time: 43.001 mS.
Total Time: 190.069 mS.
total_time: 189.963 mS.
Get Packet Time: 202.727  15,848 Bytes

Get Packet Time is a simplified method:
PHP Code:
$data file_get_contents($url);
$getTimemicrotime(true) - $getTime
Then 10 back to back iterations I get a DNS Resoulution range from 28.644 mS. to 30.602 mS.

I consider a DNS Resolution time of less than 0.040 to be "good".

Back to back testing of DNS with only 200 mS between tests is a best case response time.
Some of the test data variables are probably still in the Name Server's microprocessor's L2 cache, and I ran these test around 4:00am Sunday morning.

The DNS must have been cached for the results you linked to.

Looking at the header it's really not an impressive page.
HTTP/1.1 200 OK
Date: Sun, 08 Dec 2013 11:06:49 GMT
Server: Apache
Last-Modified: Sun, 08 Dec 2013 08:02:08 GMT
Accept-Ranges: bytes
Content-Length: 15848
Connection: close
Content-Type: text/html

No cache
No gzip
No expiration date
No Keep Alive

This is so bad that ETag would be an improvement whereas ETag is usually in my minus column.

A 30 mS DNS resolution is Good, but nothing to write home to mother about.
I'm guessing the browser has it in its cache, hence the non-existent ("-") lookup times. Same test machine, different browser:

DNS Lookup: 155 ms
The question stands, how did this site achieve a dns look-up time of 0ms?
Seems to be limited to IE9 on the LA test machine. Probably a bug?
yeah, has to be an issue with the LA agent - I'll look into it. WPT clears the OS DNS cache (and kills the browser between runs) so the DNS lookups should always be at least the configured RTT.
Reference URL's