Cloudflare 和 Incapsula 等服务是否真的可以提高 Windows Azure 上托管的网站的性能?

发布于 2025-01-02 19:54:28 字数 1056 浏览 0 评论 0原文

我正在运行一个托管在 Windows Azure 上的包含大量图像的网站。后端性能非常好,但图像缩略图(占页面大小的大部分)的响应时间非常不稳定。我使用 Azure CDN 来提供所有图像,但它们的响应时间因顺序而异我还没有发现快速(约 150 毫秒)与慢速(3-4 秒)请求的任何模式。这似乎也不是本地现象,因为我测试了不同位置/大陆的加载时间。到目前为止,我的结论是 Azure CDN 根本就没有那么好,我开始寻找其他方法来改善静态资产的加载时间。

现在上下文已经清楚了,这是我的实际问题:是否有人有使用 CloudflareIncapsula 用于提高托管在 Windows Azure 等云基础设施上的网站的性能?这些服务承诺减少服务器负载等,但我更感兴趣的是它们是否确实有效减少静态文件的响应时间以及对动态页面内容的任何负面影响。我非常感谢任何基于实践经验的答案和/或替代解决方案的建议。

更新: 以下是 CDN 上其中一张图像的响应标头:

HTTP/1.1 200 OK
Cache-Control: public, max-age:31536000
Content-Length: 4245
Content-Type: image/jpeg
Last-Modified: Sat, 21 Jan 2012 12:14:33 GMT
ETag: 0x8CEA64D5EC55FB6
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: d7a1ef38-6c99-4b38-a9f5-987419df5d24
x-ms-version: 2009-09-19
x-ms-lease-status: unlocked
x-ms-blob-type: BlockBlob
Date: Sun, 05 Feb 2012 12:56:12 GMT
Connection: keep-alive

I'm running an image-heavy website hosted on Windows Azure. Back-end performance is great but response times for image thumbnails, which make the bulk of page sizes, are quite volatile. I'm using the Azure CDN for serving all images but their response times vary by orders of magnitude and I haven't found any pattern in the fast (~150 milliseconds) vs slow (3-4 seconds) requests yet. This also doesn't seem to be a local phenomenon since I've tested the load times from different locations/continents. My conclusion so far is that the Azure CDN is simply not that good after all and I started looking for other ways to improve the load times of static assets.

Now that the context is clear, here is my actual question: does anyone have experience with services like Cloudflare and Incapsula for improving the performance of websites hosted on cloud infrastructure like Windows Azure? These services promise reduced server load among other things, but I'm more interested if they are actually effective in reducing response times for static files, as well as any negative impact on dynamic page content. I'd greatly appreciate any answers based on practical experience and/or advice for alternative solutions.

UPDATE:
Here are the response headers for one of the images on the CDN:

HTTP/1.1 200 OK
Cache-Control: public, max-age:31536000
Content-Length: 4245
Content-Type: image/jpeg
Last-Modified: Sat, 21 Jan 2012 12:14:33 GMT
ETag: 0x8CEA64D5EC55FB6
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: d7a1ef38-6c99-4b38-a9f5-987419df5d24
x-ms-version: 2009-09-19
x-ms-lease-status: unlocked
x-ms-blob-type: BlockBlob
Date: Sun, 05 Feb 2012 12:56:12 GMT
Connection: keep-alive

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

愛上了 2025-01-09 19:54:28

Incapsula 有两种缓存模式:
1) 基本 - 此模式根据 http 标头中的指令缓存静态内容(与浏览器或商业缓存代理的行为方式相同)。这通常可以提供 30%-50% 的改进
2) 高级 - 此模式还缓存 http 标头中未指定的静态内容和动态内容,方法是使用高级学习功能来确定哪些内容可缓存以及缓存何时过期。这些方法经过优化,可在最大限度的缓存和提供新鲜/最新内容之间取得适当的平衡。此模式通常会额外提高 20%-30%。

Incapsula has two caching modes:
1) Basic - this mode caches static content according to directives in the http headers (in the same way a browser would or a commercial caching proxy would behave). This typically provides 30%-50% improvement
2) Advanced - this mode also caches static content that was not specified in the http headers and dynamic content by using advanced learning capabilities to determine what content is cache-able and when to expire the cache. These methods are optimized for striking the right balance between utmost caching and serving fresh/up to date content. This mode typically adds an additional 20%-30% improvement.

你是年少的欢喜 2025-01-09 19:54:28

“这些服务承诺减少服务器负载等,但我更感兴趣的是它们是否真的能有效减少静态文件的响应时间,以及对动态页面内容的任何负面影响。我非常感谢基于以下内容的任何答案实践经验和/或替代解决方案的建议。”

实际上,我们不会影响您的动态内容,因此到达那里一切都应该很好。

我们确实缓存静态内容。大多数用户看到总体性能提高了 50-60% 左右,因此您肯定会看到服务器上的静态资源有所改善。

"These services promise reduced server load among other things, but I'm more interested if they are actually effective in reducing response times for static files, as well as any negative impact on dynamic page content. I'd greatly appreciate any answers based on practical experience and/or advice for alternative solutions."

We actually wouldn't impact your dynamic content, so everything should be good to go there.

We do cache static content. Most users see about a 50-60% improvement in performance overall, so you should definitely seen an improvement with static resources that are on your server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文