Fun with headers

My PR team tells me that nobody reads Friday afternoon blog posts, so this seems like the perfect time to publish something that will only be interesting to a very small number of people (hello jad!  hello mnot!).

A customer asked me this morning how various CDN providers handle HTTP headers, so I ran a quick test against a handful of our largest global partners:

HTTP/1.x 200 OK
ChinaCache, Cloudfront, and Internap all returned 1.0. The rest returned 1.1

Only CloudFlare, Cotendo, Edgecast, and Limelight included an Accept-Encoding header.

Bitgravity, CDNetworks, ChinaCache, CloudFlare, Fastly, NetDNA did not include an Accept-Ranges header. The rest did.

Only Azure, Bitgravity, CDNetworks, ChinaCache, Cloudfront, Fastly, and Limelight included an Age header in their response.

Cache-Control, Expires, Pragma

  • Azure, Cloudfront, Edgecast, NetDNA, and Yacast did not return any caching-related headers.
  • CDNetworks, ChinaCache, CloudFlare, Fastly, Level3, and Limelight all returned a 30 day TTL (max-age=2592000), along witht the appropriate Expires time (27 Nov 2011).
  • Akamai returned “max-age=0, no-cache, no-store” along with an Expires header and Pragma: no-cache.
  • Cotendo returned Cache-Control: no-store, Pragma: no-cache, and an Expires date older that most of my employees (01 Jan 1970).
  • Internap returned “max-age=3600, stale-if-error=3600” with no Expires header.
  • Highwinds returned “max-age=46923” with no Expires header.
  • Bitgravity returned “public,max-age=31536000” with no Expires header.

With the exception of Edgecast, everyone returned Connection: keep-alive. Highwinds and Yacast included a Keep-Alive: timeout header as well.

Content-Encoding & Content-Length
ChinaCache, CloudFlare, Cotendo, Edgecast, Fastly, Highwinds, Limelight, and NetDNA all gzip’d the file (resulting in a 146-147 byte content-length). Akamai, Azure, Bitgravity, CDNetworks, Cloudfront, Internap, Level3, and Yacast did not gzip the file (resulting in a 165 byte content-length). Cloudflare and NetDNA did not include a Content-Length header in their response.

Everyone returned application/x-javascript, except for Bitgravity (text/javascript) and Highwinds (application/javascript).

Cloudfront returned ’25 Mar 2011′. The rest returned today (28 Oct 2011).

Only Azure, Bitgravity, Cloudfront, Edgecast, Highwinds, and Internap returned an Etag header.

Highwinds did not include a Server header. Akamai, Cotendo, ChinaCache, Fastly, Level3, and Limelight returned “nginx” (ie, the Cedexis origin server). Others were all over the map:

  • Azure:: Microsoft-IIS/7.0
  • Bitgravity: bit_asic/3.8/r1s1-bitcast-b
  • CDNetworks: PWS/
  • CloudFlare: cloudflare-nginx
  • Cloudfront: AmazonS3
  • Edgecast: ECS (sjo/5279)
  • Internap: Apache/2.0.55 (Ubuntu)
  • NetDNA: nginx/1.0.2
  • Yacast: nginx/0.8.21

Only Cloudflare sets its own cookies in the customer’s domain.

Only Bitgravity, Cloudfront, Fastly, and Internap included Via headers.

A number of providers included their own proprietary HTTP headers:

  • Azure
    X-Powered-By: ASP.NET
  • CDNetworks
    X-Px: ht-d
  • ChinaCache
    Powered-By-ChinaCache: HIT from USA-WA-1-3TC
  • CloudFlare
    CF-Cache-Status: HIT
  • Cloudfront
    x-amz-request-id: A02BB234BBD99EC5
    X-Cache: Hit from cloudfront
  • Edgecast
    X-Cache: HIT
    X-Powered-By: ASP.NET
  • Fastly
    X-Varnish: 1694751746 1670053507
  • Highwinds
    X-HW: 1319839399.cj005s1
  • Internap
    X-Cache: HIT from, MISS from
    X-Cache-Age: 1217
    X-Origin-Date: Wed, 15 Dec 2010 17:16:36 GMT

Have a nice weekend.