<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Eric Klein on Medium]]></title>
        <description><![CDATA[Stories by Eric Klein on Medium]]></description>
        <link>https://medium.com/@eric.klein_73008?source=rss-4cdc81193c0e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*FOzWks5iN9fp9inx.</url>
            <title>Stories by Eric Klein on Medium</title>
            <link>https://medium.com/@eric.klein_73008?source=rss-4cdc81193c0e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 24 May 2026 12:51:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@eric.klein_73008/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[The CDN Edge — Debug Headers Can Be Your Best Friend]]></title>
            <link>https://medium.com/disney-streaming/the-cdn-edge-debug-headers-can-be-your-best-friend-af06cfd9f2db?source=rss-4cdc81193c0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/af06cfd9f2db</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cdn]]></category>
            <category><![CDATA[akamai]]></category>
            <category><![CDATA[content-delivery-network]]></category>
            <category><![CDATA[debug]]></category>
            <dc:creator><![CDATA[Eric Klein]]></dc:creator>
            <pubDate>Wed, 19 Dec 2018 23:13:22 GMT</pubDate>
            <atom:updated>2018-12-19T23:13:22.136Z</atom:updated>
            <content:encoded><![CDATA[<h3>The CDN Edge — Debug Headers Can Be Your Best Friend</h3><p><strong>A Background on Debug Headers</strong></p><p>In a <a href="https://medium.com/disney-streaming/the-cdn-edge-best-practices-for-managing-your-content-in-cache-578f753fde29">previous post</a>, I discussed how to read the basic HTTP headers that may return with your HTTP response and how these impact caching. These are just the first building blocks needed in order to better understand where and how your objects are being cached within the disparate world of Content Delivery Networks. The true key to understand what is happening within these CDNs to your content is with Debug Headers.</p><p>These handy tools are in place in some way, shape or form on each Content Delivery Network that you may leverage. While some of these debug headers are easily published on every request, certain CDNs will only append these debug headers with the presence of a specific request header. For even more security, CDNs sometimes even require additional request headers and custom keys to be passed with a request in order to receive the appropriate debug headers.</p><p>While ultimately receiving these debug headers are relatively straightforward, the actual interpretation of the information return in the response can be quite challenging. In some instances, you’ll need to refer to detailed CDN guides that break down what each and every header means. In others, single characters may provide a wealth of data that can only be interpreted with internet specifications.</p><p>In this post, I’m going to explore the general benefits of these debug headers, some of the information they provide and how to best interpret this data. While we’re going to focus on Apache Traffic Server’s Debug Headers in this post, we’ll also provide links to some CDNs discussing their own debug headers in order to provide a well rounded guide for all things CDN debug related.</p><p><strong>Debug Header Samples</strong></p><p>By presenting “X-Debug” in the request for an object, the Apache Traffic Server — when setup with the appropriate package — will respond with a whole host of debug based options. Traditionally these options include a few critical elements of information that aid in debugging requests. These variables include: Cache State &amp; Cache Location, Transaction ID, Cache Key</p><p><em>Cache State &amp; Location</em> — The Cache State and Location is typically revealed by the response contained within the “X-Cache” header. Here, you’ll receive information pertaining to the cache status of an object, as well as where that object is (for multi-tiered content delivery networks). The value of the cache status often includes:</p><ul><li>Miss — Object Not In Cache. This typically means the object was served by going all the way back to origin to retrieve the asset.</li><li>Hit-Stale — Object in Cache, but is in need of freshness check. This typically precedes a 304 request to verify object freshness.</li><li>Hit-Fresh — Object in Cache and good to serve from cache.</li><li>Skipped — Cache Lookup Was Skipped. Typically done if the configuration defines cache bypass.</li></ul><p>Additional information present in the “X-Cache” response is the name of the server responding with the cache information above. By appending multiple responses within the same response header, CDNs are typically able to present the entire request flow for an object.</p><p>For example, the below response would indicate an object that is not in cache at the first location, is stale in cache at the second location and is fresh in cache at the third location.</p><blockquote>X-Cache: Miss server01.ats.lga.foo.com; Hit-Stale server03.ats.lga.foo.com; Hit-Fresh server01.ats.yyz.foo.com</blockquote><p>As a result of this debug header, you can see the flow for this object through the CDN, and understand how things are behaving for your individual request, eventually being handled from a parent tier cache in a Toronto(YYZ) point of presence.</p><p><em>Transaction ID</em> — Designated by “X-Transaction-ID” this value typically provides a unique string that is useful for identifying a transaction within logs. This enables retroactive analysis of a request to chase down exactly what happened to a specific request for a single asset. This feature is incredibly useful when trying to figure out how a specific object behaves within the entire CDN workflow and to diagnose any problems that may arise for a configuration.</p><p><em>Cache Key</em> — Cache Key is perhaps the most useful debug header that you can evaluate. By providing the exact way that the CDN is interpreting and caching your object, you’re able to see whether things are appropriately configured on a specific request.</p><p>For example, let’s say you are removing query strings from a cacheable object in order to improve cache efficiency. While the request for the object may be http://www.bar.com/page/uri.jpg?123456, stripping of query parameters from the cache key should result in a different response from the x-cache-key header. In this instance, the cache key should be:</p><blockquote>X-Cache-Key: origin.bar.com/page/uri.jpg</blockquote><p>X-Cache-Key may also be revelatory if you have a more complex setup. Say that you’re using a different string match to replace a path within an object. By reviewing the cache key, you can ensure that this path replacement is occurring as expected, ensuring a smooth request flow for any asset requested against this specific setup.</p><p>One example of this scenario is if you’re configuration calls for /page/ in the URI above to be stripped on requests back to origin and replaced by /home/. In this scenario, the X-Cache-Key response should look like:</p><blockquote>X-Cache-Key: origin.bar.com/home/uri.jpg</blockquote><p>Add in complexity around regular expression configurations and advanced options and the X-Cache-Key feature becomes a crucial factor in being able to ensures CDNs are handling your objects appropriately.</p><p><strong>More on Debug Headers</strong></p><p>The usefulness and variety of CDN debug headers are numerous. Each CDN’s unique take makes memorizing these options and interpretations difficult.</p><p>While there is work underway to better standardize these requests and options as part of CDNi work in the Internet Engineering Task Force, the maturity of these headers across multiple different platforms still leaves a disjointed landscape of options for any content delivery specialist to navigate.</p><p>In order to better navigate these response header values, below are some examples from many of the popular commercial Content Delivery Networks. It is also recommended to always receive an education from your CDN of choice on their Debug Headers and all the different permutations when on boarding with that particular provider.</p><p>More to come from the CDN Edge in the future.</p><p><strong>Useful Links</strong></p><p>Akamai Pragma Headers:</p><p><a href="https://community.akamai.com/customers/s/article/Using-Akamai-Pragma-headers-to-investigate-or-troubleshoot-Akamai-content-delivery?language=en_US">Akamai Community</a></p><p>Fastly Debug Headers:</p><p><a href="https://community.fastly.com/t/deciphering-fastly-debug-header/520">Deciphering Fastly-Debug header</a></p><p>Limelight Debug Headers:</p><p><a href="https://slideplayer.com/slide/3116110/">Troubleshooting using HTTP Headers - ppt video online download</a></p><p>Additional Debug Header samples from a Catchpoint blog post:</p><p><a href="http://blog.catchpoint.com/2017/02/27/debugging-cdns-need-change/">Debugging CDNs: A Need for Change | CDN Performance</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*A3alvS7shu3rOFJT" /><figcaption>Photo by <a href="https://pixabay.com/en/users/geralt-9301/">Gerd Altman</a> on <a href="https://pixabay.com/">https://pixabay.com/</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af06cfd9f2db" width="1" height="1" alt=""><hr><p><a href="https://medium.com/disney-streaming/the-cdn-edge-debug-headers-can-be-your-best-friend-af06cfd9f2db">The CDN Edge — Debug Headers Can Be Your Best Friend</a> was originally published in <a href="https://medium.com/disney-streaming">disney-streaming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The CDN Edge — Best Practices For Managing Your Content in Cache]]></title>
            <link>https://medium.com/disney-streaming/the-cdn-edge-best-practices-for-managing-your-content-in-cache-578f753fde29?source=rss-4cdc81193c0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/578f753fde29</guid>
            <category><![CDATA[cdn]]></category>
            <category><![CDATA[streaming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Eric Klein]]></dc:creator>
            <pubDate>Fri, 05 Oct 2018 09:59:34 GMT</pubDate>
            <atom:updated>2018-10-05T09:59:34.706Z</atom:updated>
            <content:encoded><![CDATA[<h3>The CDN Edge — Best Practices For Managing Your Content in Cache</h3><p>Content Delivery Networks (CDNs) have become a vital layer of the internet ecosystem. Once a term used to discuss companies focused on distributed networks of proxy servers, the solutions now provided in this space are far more encompassing.</p><p>CDNs are no longer just focused on distributed datacenters designed to scale to deliver static content. Now they are inclusive of edge computing, video streaming, mobile content acceleration, load balancing and DDoS Security, amongst other offerings. CDNs are central to serving a large portion of the internet content today.</p><p>And yet, for all of their features, functions and form, they still remain relatively obscure. Difficult to penetrate networks with internal architectures that are not easily understood. You may find out only a little bit about where your content is deployed at any given time, but to truly gain deep insight into where a specific individual request may be satisfied and to debug how your content is being delivered, you need specific ways to gain this insight.</p><p>In a continuing series, we hope to focus on best practices for engaging with cached content, the latest features on CDNs and some of the upcoming advancements in the industry.</p><p>This first entry in the series covers the specific aspects of the headers you need to be aware of to analyze your content cache health. A crucial aspect to debugging your CDN experience, Headers are the building blocks to understanding each and every request.</p><p><strong>Know Your Headers</strong></p><p>A simple spot to start in debugging any CDN request is to know your HTTP headers. These headers are crucial to being able to evaluate any request that comes in. Some key headers to keep an eye on include:</p><ul><li><strong>Max-Age</strong>: Typically classified as TTL, or Time to Live, max-age (as well as s-maxage) is actually the HTTP header that is tracking this value. The Max-Age will provide insight into how long the object has remaining in cache. S-MaxAge which is more intermediate cache focused. In the case of a presence of both values S-MaxAge will take precedent.</li><li><strong>Expires</strong>: Another crucial aspect to determining the TTL of an object, Expires provides the exact date and time where an object will no longer be considered valid, resulting in a content refresh to ensure that it is still a valid cacheable object.</li><li><strong>Last-Modified</strong>: Want to know how old the file is that you are requesting? The answer lies in the Last-Modified header. While this does not necessarily tell you how long the object has been in the CDN cache, this header does inform you when the object you were requesting was last updated. With content that has a low TTL or is frequently updated, this is typically a good indication that cache is working as it should</li><li><strong>E-Tag</strong>: The E-Tag is a unique identifier per piece of content. E-Tags are typically a good indication of the uniqueness of an object in cache. If the object changes, the e-tag will change. With this simple header, you can verify that the object you’re serving and the object in cache are exactly the same. It also allows for an easy way for CDNs to verify that content is fresh — when it’s leveraged.</li><li><strong>Status Codes</strong>: We all know that Status Codes such as 200, 206, 403, 404, 503, 504 are crucial to any response indicating the health of the object, but did you know that certain CDNs have specific ways they handle these status codes and respond? 404s, while traditionally indicative of an object not being found, can also be the result of a CDN temporarily caching an error code. Make sure to note the difference based on the Max-Age of the error response. What about a 503 — Service Unavailable — or 504 — Gateway Timeout? These could indicate CDN issues or content origin issues. To dive further you need to be very cognizant of the status code you receive back and take the next step accordingly.</li></ul><p>These are just some of headers that we look at when evaluate requests but are definitely the first few that help give an indication into how content is behaving and the role cache is playing in the requests.</p><p><strong>A Simple cURL Can Be Your Friend</strong></p><p>Performing a simple GET request on your content via Curl, or through a proxy tool such as Charles, is a key way to understanding CDN behavior. All CDNs provider debug headers that, when passed along with your request, will give you details back on what is happening with your content.</p><p>These debug headers, easily available by request from your CDN’s technical team or via an internet search, provide back a wealth of information that gives you an almost instant way to analyze the behavior of your content inside the Content Delivery Networks.</p><p>In the case of some of these debug headers, you’ll find information such as the TTL of the object — both as you set it, as well as how the CDN is caching it. You’ll also discover where your content is served from and whether or not it was being served by the CDN’s cache or being fetched from your origin (Hit/Miss).</p><p><strong>Just The First</strong></p><p>In a subsequent post, we’ll go into the above debug headers in detail and how to use them to analyze your CDN experience. We’ll also explore some alternative ways to test your content in cache, dive into ways to leverage proxy tools and more to further evaluate and explore the way your content is cached on the edge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wN5t9ILU0fpnhbMX2vtng.jpeg" /><figcaption>Photo by <a href="https://pixabay.com/en/users/JohnsonGoh-3978075/">JohnsonGoh</a> on <a href="https://pixabay.com/en/ilight-ilightmarine-abstract-2185506/">Pixabay</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=578f753fde29" width="1" height="1" alt=""><hr><p><a href="https://medium.com/disney-streaming/the-cdn-edge-best-practices-for-managing-your-content-in-cache-578f753fde29">The CDN Edge — Best Practices For Managing Your Content in Cache</a> was originally published in <a href="https://medium.com/disney-streaming">disney-streaming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>