GAE 真的 GZip 压缩我的内容吗?使用 GAE 作为 CDN 时响应时间较慢
我正在测试 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我没有发现您的示例 GIF 的延迟有任何奇怪的地方。我认为所有 GAE 引擎应用程序都托管在美国,因此如果您的用户位于亚洲,那么将其用作 CDN 可能并不完美。浏览器缓存应该会为您解决这个问题,因此请确保设置正确。
GIF 的 apachebench:
stackoverflow 徽标的 apachebench(对不起 Jeff):
请注意,您的图像是 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:
apachebench for the stackoverflow logo (sorry Jeff):
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.
如果我使用 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.
您还可以使用优秀的 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.