优化应用程序服务器静态内容的吞吐量
我正在构建一个小型 Web 应用程序,主要需要提供受保护的静态内容 - 一些 flash (.swf) 文件 > 20MB — 来自由 Web 服务器 (Apache) 前端的应用程序服务器 (Websphere)。为了优化吞吐量,我应该考虑哪些 Websphere 配置设置?
I am building a small web application that primarily needs to serve up protected static content -- some flash (.swf) files > 20MB -- from an application server (Websphere) that is front ended by a web server (Apache). Are there there any Websphere configuration settings that I should consider to optimized throughput?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Expires
标头设置为遥远的将来的日期。 PageSpeed 性能最佳做法。这意味着每个用户只能下载一次静态内容。Expires
header to a date in the distant future, for example. PageSpeed performance best practices. This will mean the static content is downloaded only once per user.以下是有关优化静态页面服务的一些有趣信息:
有多种方法可以将静态文件作为 WebSphere 应用程序的一部分提供服务。
1. WebSphere 可以用作您的 Web 服务器,因此用户可以直接连接到 WebSphere,并且它可以提供静态和动态页面。
2. 或者,您可以配置一个 IHS 实例,将其用作您的 Web 服务器,然后通过 WebSphere 的 Web 服务器插件将静态和动态请求转发到 WebSphere。
3. 另一种选择是直接使用 IHS 提供静态文件,仅转发要由 WebSphere 处理的动态页面。
对于许多应用程序来说,选项 #2 可能是更好的选择,特别是那些经常更新的应用程序(因为 WAR 文件中的静态文件必须重新复制到 IHS 目录),或者需要保护静态内容。为了优化性能,WebSphere Web 服务器插件具有称为边缘包含 (ESI) 缓存的功能,并通过 plugin-cfg.xml 文件进行配置。 ESI处理器能够缓存整个页面以及片段,从而提供更高的缓存命中率。 ESI处理器实现的缓存是内存缓存,而不是磁盘缓存,因此,当Web服务器重新启动时,缓存条目不会被保存。
进一步阅读:
http://www.ibmsystemsmag.com/ibmi/april05/tipstechniques/14821p2。 ASPX
Here is some interesting information about optimizing the serving of static pages:
There are many ways to serve static files as part of your WebSphere application.
1. WebSphere can be used as your Web server, so users connect directly to WebSphere and it serves static and dynamic pages.
2. Alternatively, you can configure an IHS instance, which will be used as your Web server and then forward the static and dynamic requests to WebSphere through WebSphere's Web server plug-in.
3. Another option is to serve the static files directly with IHS, forwarding only the dynamic pages to be handled by WebSphere.
Option #2 may be a better choice for many applications, especially those that are updated frequently, (since static files from the WAR file must be recopied to the IHS directory), or if the static content needs to be protected. In order to optimize performance, the WebSphere Web-server plug-in has a feature called the Edge Side Include (ESI) cache, and is configured through the plugin-cfg.xml file. The ESI processor has the ability to cache whole pages, as well as fragments, providing a higher cache hit ratio. The cache implemented by the ESI processor is an in-memory cache, not a disk cache, therefore, the cache entries are not saved when the Web server is restarted.
Further reading:
http://www.ibmsystemsmag.com/ibmi/april05/tipstechniques/14821p2.aspx