See use case #7 for a description of this requirement.
Note: The DNS plugin hasn't been tested. Your help in testing it is appreciated.
Measuring DNS requires some server-side set up. The entire set up was documented in detail by Yahoo! engineer Carlos Bueno, so go read his post for everything you'll need to set this up. In brief, the points he covers are:
A.gif
and B.gif
(from the images/ subdirectory) as fast as possible.
Make sure that KeepAlive, Nagle, and any caching headers are turned off.dns.js
along with boomerang.js
(you can just concatenate the two
files)Steps 1 and 2 are complicated, and if you don't have full control over your DNS server (eg: you use Dreamhost), then it may be impossible for you to do this. If you can go forward, read on.
To configure the plugin, you only need to tell it where to get its images from. Unlike the bandwidth plugin though, this URL needs a wildcard:
<script src="boomerang.js" type="text/javascript"></script> <script src="dns.js" type="text/javascript"></script> <!-- concatenate with boomerang.js for better performance --> <script type="text/javascript"> BOOMR.init({ user_ip: "<user's ip address>", beacon_url: "http://yoursite.com/path/to/beacon.php", DNS: { base_url: "http://*.yoursite.com/images/" } }); </script>
If you've set things up correctly, this should measure your DNS latency within a margin of error. We could run the test multiple times to find out what this error is, but for now we'll just do it once.
The latest code and docs is available on github.com/SOASTA/boomerang