CDN debugging is a great idea for CDN customers looking to troubleshoot problems that they are experiencing with the content delivery network. In this guide, I will show you how to performing effective CDN debugging for when you think you may have a problem with your content delivery network.
Curl is a command line tool that is available preinstalled on MacOS and Linux and is also available as a separate download for Windows. By using a series of command line flags, you can test how well your CDN is working.
Your curl commands must start with “curl -svo /dev/null”. The “-svo /dev/null” is a series of flags:
“-s” enables silent mode; this means it doesn’t show a progress meter or error messages.
“-v” enables verbose output
“-o /dev/null” sends output to a file (on Windows, use “-o NUL”)
Therefore, “-svo /dev/null” gives you a clean display of information. Of particular importance is the request and response headers.
The “-H” flag can be used to send an arbitrary request header, for example a specific User-Agent string:
“-H 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25”
Here is an example curl command for fetching the (gzip) compressed version of http://edition.cnn.com/css/2.33.0/global.css.
“curl -svo /dev/null --compressed 'http://edition.cnn.com/css/2.33.0/global.css'”
Conduct CDN Debugging Against Multiple PoPs
It’s important to test your CDN’s performance and status against many different points of presence. This is because any issues you’re experiencing may be PoP specific, with other PoPs performing well.
To send a request to a specific target endpoint (a CDNetworks server in Amsterdam, for example), use the “-H” flag to add a Host header with your domain:
“curl -svo /dev/null -H 'Host: cdn.yourdomain.com' 'http://184.108.40.206/path/to/file'”
Always Try to Test Real User Networks - Not Datacentres
It’s important to try CDN debugging not just from your office, but also from a residential end user location. This is because many issues can occur across last mile networks.
A good method of testing from real user networks is the free tool TurboBytes Pulse. This tools let you quickly connect DNS, HTTP and Traceroute responses from many computers around the world.
Takes less than 5 minutes. A tailored global performance analysis at no obligation.