Azure CDN 没有 return gzip 数据
Azure CDN doesn't return gzipped data
我用 Windows Azure CDN 配置了 gzip compression,但 CDN 仍然提供未压缩的数据:
$ curl -H "Accept-Encoding: gzip" -I https://bbbdev.azureedge.net/images/512.png
HTTP/1.1 200 OK
Content-MD5: GAXAIuQyL8MhCNc+BW1baw==
Content-Type: image/png
Date: Tue, 26 Apr 2016 12:59:45 GMT
Etag: 0x8D363B09C5AB6D6
Last-Modified: Wed, 13 Apr 2016 15:30:57 GMT
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
Vary: Origin
x-ms-blob-type: BlockBlob
x-ms-lease-status: unlocked
x-ms-request-id: 60846501-0001-0042-23bb-9f72d0000000
x-ms-version: 2009-09-19
x-ms-write-protection: false
Content-Length: 11028
而且我添加了 image/png
和 image/jpeg
作为 "Formats to compress" - 但运气不好。
事实是 - 在我们的 origin(Blob 存储)中,这些文件未压缩 - 我们只是使用 Azure SDK 中的 self.blob.put_block_blob_from_path()
将它们放入容器中。
正如我在 similar topic 中发现的那样 - 如果文件未在 origin 端压缩 - CDN 将不会对它们进行 gzip。
那么 - 是否只有 "manually"(实际上是通过脚本)在 push
之前将它们 gzip 到存储 - 或者这可以通过其他方式完成吗?
从这个页面:https://azure.microsoft.com/en-us/documentation/articles/cdn-improve-performance/#notes
"As with deploying new endpoints, CDN configuration changes take some time to propagate through the network. In most cases, you will see your changes apply within 90 minutes. If this is the first time you've set up compression for your CDN endpoint, you should consider waiting 1-2 hours to be sure the compression settings have propagated to the POPs before troubleshooting."
很高兴现在一切正常!
我用 Windows Azure CDN 配置了 gzip compression,但 CDN 仍然提供未压缩的数据:
$ curl -H "Accept-Encoding: gzip" -I https://bbbdev.azureedge.net/images/512.png
HTTP/1.1 200 OK
Content-MD5: GAXAIuQyL8MhCNc+BW1baw==
Content-Type: image/png
Date: Tue, 26 Apr 2016 12:59:45 GMT
Etag: 0x8D363B09C5AB6D6
Last-Modified: Wed, 13 Apr 2016 15:30:57 GMT
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
Vary: Origin
x-ms-blob-type: BlockBlob
x-ms-lease-status: unlocked
x-ms-request-id: 60846501-0001-0042-23bb-9f72d0000000
x-ms-version: 2009-09-19
x-ms-write-protection: false
Content-Length: 11028
而且我添加了 image/png
和 image/jpeg
作为 "Formats to compress" - 但运气不好。
事实是 - 在我们的 origin(Blob 存储)中,这些文件未压缩 - 我们只是使用 Azure SDK 中的 self.blob.put_block_blob_from_path()
将它们放入容器中。
正如我在 similar topic 中发现的那样 - 如果文件未在 origin 端压缩 - CDN 将不会对它们进行 gzip。
那么 - 是否只有 "manually"(实际上是通过脚本)在 push
之前将它们 gzip 到存储 - 或者这可以通过其他方式完成吗?
从这个页面:https://azure.microsoft.com/en-us/documentation/articles/cdn-improve-performance/#notes
"As with deploying new endpoints, CDN configuration changes take some time to propagate through the network. In most cases, you will see your changes apply within 90 minutes. If this is the first time you've set up compression for your CDN endpoint, you should consider waiting 1-2 hours to be sure the compression settings have propagated to the POPs before troubleshooting."
很高兴现在一切正常!