Analyzing CDN Traffic to Your Website

By Brian Jackson
Updated on March 21, 2018
Analyzing CDN Traffic to Your Website

KeyCDN has built a powerful back-end dashboard which includes a lot of useful features such as Usage, Analytics, Geo Stats, Real-time logs, and Real-time Statistics. You can use these tools to analyze CDN traffic to your website and better determine traffic patterns (peak times of the day), high bandwidth files, error codes (4xx) and know exactly how KeyCDN is delivering your content. We are always working on improvements to ensure you can access your data in the easiest and fastest way possible.

CDN Usage

The first tool available under “Reporting” in the KeyCDN dashboard is Usage. You can see the total traffic (bandwidth used) for a specific time period, the % of successful cache HITs, the total number of successful 2xx notifications, and the number of client errors, 4xx. See a full list of CDN error codes. You can also see the amount of data used for storage, if you are using that method.

If you are a new customer you can use the total traffic bandwidth and our easy pricing calculator to estimate how much your CDN would cost, during your free trial. Also see our post on how your CDN traffic is charged.

You can filter the data by Zone from the upper left-hand corner.

And you can filter by date range, such as last 24 hours, last 30 days, or choose a custom range.

What are the Cache Hits? The cache hit percentage (CHP) gives precise information about the amount of files served from the CDN without any request to the origin server. A number of factors can influence it such as:

  • Query strings:
  • Expire headers
  • Purge
  • New files
  • User generated content (long tail content)
  • Not cacheable content

Read our more in-depth post about cache hit percentage.

If you are wondering why you are seeing so many 4xx errors there could be a number of reasons for that. Most websites will typically have a few 4xx errors, even those functioning properly. Some reasons for 4xx errors include:

  • Browsers sometimes request files by default (e.g. /favicon.ico ) even if the files don’t exist.
  • Users manually request old files that no longer exist.
  • Bots from search engines crawl for old content.
  • Your website is requesting files which don’t exist but should actually be there. This is one scenario that you should avoid and will want to further analyze by using the real-time logging features we mention further down in this post.

CDN Analytics

The second tool available under “Reporting” in the KeyCDN dashboard is Analytics. This allows you to quickly see a general overview of HTTP and cache statuses. Donut charts are available for HTTP and cache statuses as well as file types and file sizes. If you would rather a chart view, these are also available for HTTP and cache statuses. Moreover, it is also possible to filter the data by date and the Zone for a more granular view of your analytics.

CDN Geo Stats

The third tool available under “Reporting” in the KeyCDN dashboard is Geo Stats. This allows you to see easily see the top ten countries by both data transferred and the number of requests. Immediately you can know where the bulk of your traffic is coming from. It is sorted by country, country code, and bytes transferred/number of requests. As of November 2015, it is now also possible to filter the data by the date and the Zone.

As you can see in our screen below we can quickly see in a matter of seconds that over 80% of our CDN assets are being delivered to visitors in the United States.

CDN Real-Time Logs

The fourth tool available under “Reporting” in the KeyCDN dashboard is Real-time Logs. This allows you to instantly analyze your traffic. You could live tail on all your traffic or define filters in JSON format. This could be very helpful to identify broken links (Status: 404) or if your content has been cached (Cache: HIT).

All the log data of our globally distributed edge servers are processed in real-time by our logging platform. The logging platform has been built on a NoSQL cluster to be highly scalable and to deliver real-time queries in milliseconds (ms).

By clicking on the details button you can see additional supported syntax for queries that you can use for live tail.

Supported Query Fields Description
zone Zone name (e.g. abc)
pop POP location (e.g. uswd, usla, defr, etc)
cc Country code (e.g. US)
cache Cache status of the request (e.g. HIT, MISS, etc)
status HTTP status of the request (e.g. 200, 206, 404)

One or more fields could be used in a query.

Examples

{"zone":"abc","status":"404"}

{"cache":"MISS"}

{"status":"403", "cache":"MISS"}

The tail will run on all your Zones if you don’t specify the Zone field.

Read more about how to analyze your CDN raw logs. You can also take advantage of our log forwarding which allows you to utilize popular third-party log management solutions such as logentries or loggly.

CDN Real-Time Statistics

The fifth and final tool available under “Reporting” in the KeyCDN dashboard is Real-time Statistics. As you can tell we are a fan of real-time. With this tool you can monitor your utilization in real-time and immediately get feedback on how we are delivering your content. The following stats are available:

  • Traffic per second (Mb/s)
  • Requests per second
  • Cache Hit Ratio in %

Summary

As you can see KeyCDN provides many tools to analyze CDN traffic to your website. We are always evaluating ways to make them better and are currently working on rolling out even more improvements to the above tools. As a KeyCDN customer, you can always submit feature requests by posting to our “Feedback and Requests” forum.

Supercharge your content delivery 🚀

Try KeyCDN with a free 14 day trial, no credit card required.

Get started

Comments

KeyCDN uses cookies to make its website easier to use. Learn more about cookies.