GAE 真的 GZip 压缩我的内容吗?使用 GAE 作为 CDN 时响应时间较慢

发布于 2024-08-28 09:46:38 字数 693 浏览 6 评论 0原文

我正在测试 Google App Engine 作为免费的内容分发网络,感觉需要很长时间才能提供我的内容。我在某处读到说 GAE 默认情况下会对您的所有内容进行 gzip 压缩,即这是我想尝试一下的主要原因。

为什么这个gae页面需要半秒才能下载,而你的典型即使内容多得多,堆栈溢出页面下载速度也会更快?

我在这里缺少什么?我所做的只是创建一个应用程序并根据该教程上传图像,但内容的提供似乎非常缓慢。有什么建议吗? (现在不考虑亚马逊或其他 CDN,只是寻求 GAE 的帮助)。

注意:当我访问这些链接时,我正在使用 Safari,也许 Safari 导致了问题?

I am testing out Google App Engine as a free Content Delivery Network and it feels like it's taking a long time to serve up my content. I read somewhere that GAE gzips all of your content by default, that's the primary reason I'd like to give it a shot.

Why does this gae page take a say a half a second to download, while your typical stack overflow page downloads much faster even with a ton more content?

What am I missing here? All I have done is create an app and uploaded an image according to that tutorial, but content is being served very slowly it seems. Any suggestions? (Not considering Amazon or other CDNs right now, just looking for help with GAE).

Note: I am using Safari when I visit those links, maybe safari is causing problems?

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

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

发布评论

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

评论(3

知足的幸福 2024-09-04 09:46:38

我没有发现您的示例 GIF 的延迟有任何奇怪的地方。我认为所有 GAE 引擎应用程序都托管在美国,因此如果您的用户位于亚洲,那么将其用作 CDN 可能并不完美。浏览器缓存应该会为您解决这个问题,因此请确保设置正确。

GIF 的 apachebench:

Percentage of the requests served within a certain time (ms)
  50%    211
  66%    257
  75%    288
  80%    289
  90%    296
  95%    302
  98%    328
  99%    345
 100%    345 (longest request)

stackoverflow 徽标的 apachebench(对不起 Jeff):

Percentage of the requests served within a certain time (ms)
  50%    372
  66%    373
  75%    373
  80%    373
  90%    374
  95%    376
  98%    384
  99%    384
 100%    384 (longest request)

请注意,您的图像是 SO 徽标大小的 4 倍,如果您发出大量并发请求,我猜 GAE 托管版本将处理负载好多了。

对 GIF 进行压缩是毫无意义的(而且是完全错误的),因为它已经被压缩了。

I don't see anything strange about the latency for your sample GIF. I think all GAE engine apps are hosted in the united states so using it as a CDN may not be perfect if your users are in Asia for example. Browser caching should take care of the issue for you so make sure that is set up correctly.

apachebench for your GIF:

Percentage of the requests served within a certain time (ms)
  50%    211
  66%    257
  75%    288
  80%    289
  90%    296
  95%    302
  98%    328
  99%    345
 100%    345 (longest request)

apachebench for the stackoverflow logo (sorry Jeff):

Percentage of the requests served within a certain time (ms)
  50%    372
  66%    373
  75%    373
  80%    373
  90%    374
  95%    376
  98%    384
  99%    384
 100%    384 (longest request)

Note that your image is 4 times the size of the SO logo and that if you would make a lot of concurrent requests I would guess that the GAE hosted version would handle the load a lot better.

Gzipping a GIF would be pointless (and plain wrong) since its already compressed.

望笑 2024-09-04 09:46:38

如果我使用 Chrome 5 开发人员工具,则会有一个名为审核的选项卡。如果我点击测试,它会提到内容不是 GZipped。

If I use the Chrome 5 Developer tools, there is a tab called audit. If i click test, it mentions the content is not GZipped.

摘星┃星的人 2024-09-04 09:46:38

您还可以使用优秀的 Firefox YSlow 插件。这将为您提供基于大约二十种不同衡量标准(包括页面组件压缩)的 AF 性能等级。

You can also use the excellent YSlow plugin for Firefox. This will give you an A-F performance grade based on about twenty different measures including compression of page components.

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