HTTP 压缩有问题吗?
我们正在研究 HTTP 压缩在 JBoss 提供的应用程序上的使用情况。 在 Tomcat SAR 中进行设置更改后,我们看到大约 80% 的压缩 - 这显然很棒,但我想保持谨慎......在整个系统范围内实施此之前,有人在使用 HTTP 压缩时遇到过问题吗?
对于我的情况,有几点需要注意。
- 我们完全控制浏览器 - 所以整个公司都使用 IE6/7
- 该应用程序仅在内部
- 使用在负载测试期间,我们的应用程序服务器负载相对较小 - 数据库是我们的瓶颈
- 我们可以控制客户端计算机,它们都有一个规格检查(不错的处理器/2GB RAM)
任何与此相关的经验将不胜感激!
We are investigating the use of HTTP Compression on an application being served up by JBoss. After making the setting change in the Tomcat SAR, we are seeing a compression of about 80% - this is obviously great, however I want to be cautious... before implementing this system wide, has anyone out there encountered issues using HTTP Compression?
A couple points to note for my situation.
- We have full control over browser - so the whole company uses IE6/7
- The app is internal only
- During load testing, our app server was under relatively small load - the DB was our bottleneck
- We have control over client machines and they all get a spec check (decent processor/2GB RAM)
Any experiences with this would be much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
压缩并不被认为是奇异的或前沿的,并且(fwiw)我还没有听说过或遇到过任何问题。
Compression is not considered exotic or bleeding edge and (fwiw) I haven't heard of or run into any issues with it.
动态压缩会增加服务器上的 CPU 负载。 如果可能的话,预压缩静态资源并缓存压缩的动态响应可以解决这个问题。
Compression on the fly can increase CPU load on the server. If at all possible pre-compressing static resources and caching compressed dynamic responses can combat that.
这始终是一个非常好的主意。 它会给您的服务器增加轻微的 CPU 负载,但这通常不是您的瓶颈。 它将使您的页面加载速度更快,并且您将使用更少的带宽。
It just a really good idea all the way around. It will add slight CPU load to your server, but that's usually not your bottleneck. It will make your pages load faster, and you'll use less bandwidth.
只要您正确尊重客户端的 Accept-Encoding 标头(即,不要向无法解压缩的客户端提供压缩文件),就不应该有问题。
哦,请记住 deflate 比 gzip 更快。
As long as you respect the client's
Accept-Encoding
header properly (i.e. don't serve compressed files to clients that can't decompress them), you shouldn't have a problem.Oh, and remember that deflate is faster than gzip.