When you installed your CDN service, you or your vendor likely conducted some extensive testing procedures to tweak any problems. However, you should continue to monitor your CDN through various reports to make sure that it is performing as it should and to address potential issues before they become serious problems. Here are some examples of the type of information you could find on a CDN usage report.
1. Bandwidth and Traffic
Most usage reports will provide you with the bandwidth and traffic to help you identify peak traffic hours and the amount of bandwidth in use. Some reports can provide you with information on concurrent users and/or your costs. Usage reports may be live, static or real-time reports. Real-time reports for a CDN static or static push service can be in the form of access logs that detail your top files, the location of the CDN server, and information about cached and uncached data. For CDN live or video services, real-time reports can show the location, duration and data size.
Understanding trends in traffic can help you prepare for upcoming events as well as determine whether spikes are unusual. For example, if your reports showed a dramatic increase in traffic in a geographic area that usually experiences a low volume, a championship game involving a local sports team or an important news event might be a reasonable explanation.
2. Raw Access Data
Raw access logs that you can download can be a valuable source of information for your analysts. Typically, you can choose the number of days that you want to keep your logs in storage. Logs are normally collected hourly.
3. Cache Hit Ratio
Cached data is served to the users from your CDN cached. If the data requested is not in the CDN cache, it will be pulled automatically from the CDN edge server before being served to your users. Cached data represents a cache hit; uncached data represents a cache miss. Your hit ratio is your cached data divided by the sum of your cached data and your uncached data. The result is expressed as a percentage. Knowing your cache hit ratio can help you determine whether it would be better to prefetch new content that you have added to the origin, analyze the impact of redirects and check for important data that may have expired in the CDN cache.
4. HTTP Status Codes
Checking the HTTP status codes on your CDN usage report can give you vital information on how your CDN service is handling requests.
- Ideally, you would want to see HTTP status codes in the 200s; these codes indicate successful HTTP requests.
- Status codes in the 300s indicate that a redirection layer is being set up. Using your IP origin instead of your hostname origin can help you avoid any conflicts when redirection is necessary.
- HTTP status codes in the 400s indicate an issue with the CDN edge server. Sometimes, this is proper behavior; if the CDN resource status is “preparing” rather than “active,” for example, such a status code would be correct. It could also be the correct behavior for attempts to access the CDN resource from a prohibited country. However, since a potentially disruptive problem may exist, a status code in the 400s should always be researched.
- HTTP status codes in the 500s indicate that the edge servers cannot retrieve the requested content from the resource origin. The problem could be that the firewall has blocked the CDN Pop, the DNS for the hostname is not working, or your IP origin is not accessible.
Final Thoughts
CDN usage reports contain a wealth of information. However, you will need to set them up, which usually requires very little time. You will then need to review them periodically to make the most of your CDN.