开发者

Can I suppress the Etag header from being issued on AWS Cloudfront?

I am using Amazon's Cloudfront CDN for static assets. Couldfront issues an Etag for every GET request. I have set meta data fro all my assets with specif开发者_如何学Cic Cache-Control information, which (as I understand) makes the Etag superfluous. I test my site's load performance at WebPageTest.org, and it dings me for these unnecessary Etags. If they are in fact unnecessary, does anyone know of a way to suppress their being emitted?


If you are using an Origin Server and disabled ETag on the origin server, CloudFront would not add the ETag in its headers. I verified it by disabling the ETag on my origin server.


If Cloudfront delivers consistent Etags regardless of which node you download the asset from, then this should minimize the problem. I've tested this by doing the following:

Resolving to Cloudfront from two different locations, I verified that the CNAMEs resolved to completely different sets of IP addresses. The first server resolved to a set of 8 IP addresses in Amazon's LAX data center (lax1.cloudfront.net), the second server resolved to 8 IP addresses in Amazon's SFO datacenter (sfo4.cloudfront.net).

I selected an object in our Cloudfront distribution and did a "wget --server-response" from each location, and then compared the results. I did this for each data center multiple times to get responses from different IP addresses in each datacenter.

The results were that the Etags were the same, regardles of which datacenter I hit, and which IP address responded from that datacenter.

I did notice that the following headers DID differ between servers x-amz-id-2 x-amz-request-id Age X-Amz-Cf-Id Via

Hope this helps,

David

[edited - removed comments on eTags based on good correction below]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜