个人信息
![]() |
|
| zhaoshouzhong(zhaoshouzhong) | |
| 状态: | |
| 等级: | |
| 性别:男 | 年龄: 22 |
| 城市: 保密 | |
| 签名: | |
我的相册
最新日志
| ·软件核心竞争力(2006-01-12) |
| ·微内核研究(2006-01-12) |
| ·XPDL2.0正式版发布(2005-11-22) |
| ·基于基线的版本管理和质量控制(2005-11-13) |
| ·计划管理(2005-11-13) |
我的评论
| ·访客167667(访客)/2006-11-03 |
| 小日本真过分,视中.... |
| ·访客921058/2006-07-20 |
| 你好,您研究Pro.... |
| ·访客248125/2006-03-27 |
| 同意 |
| ·访客427256/2006-02-14 |
| 加油哦! 顺便告诉你.... |
我的日历
我的链接
| 2005-08-29 16:56:26 |
| apache,tomcat负载平衡 |
| 1. The integration of the Apache web server and the Tomcat servlet container together has been a popular choice to handle web requests and to balance loads. 2.Apache 2.0 is a standards compliant, fast and mature web server which excels at delivering static content such as static HTML pages and images. The Tomcat web server is great for serving Java Server Pages and servlets, but it is not as fast as Apache for delivering static content. In order to build a fast, scalable web application, the requirements call for an Apache server that delegates servicing of JSP and servlet requests to multiple tomcat servers by using an Apache module, mod_jk, that performs load balancing with session affinity, also known as "sticky" sessions. 3.Typical Apache-Tomcat proxy configurations The standard Apache-Tomcat proxy configuration places an Apache (proxy) HTTP server before the Tomcat application servers in a "neutral zone" between the company's private network and the Internet (or some other outside public network) for secure access to the company's private data. This proxy server also acts as a load balancer and as a server of static content. Figure 1 shows such a configuration scenario. http://www.javaworld.com/javaworld/jw-02-2005/images/jw-0228-pippo1.gifTo connect Apache to Tomcat, you can choose one of the standard connectors. For production deployment, mod_jk is the best choice (see Tomcat FAQ and "Fronting Tomcat" for further details). In particular, the mod_jk connector is said to provide approximately double the performance than mod_proxy for several reasons, including a persistent connection pool to Tomcat and a custom optimized protocol named AJP (see the Apache Jakarta Tomcat Connector). For a step-by-step explanation on how to connect an array of Tomcats to Apache using such a connector, see "High Availability Tomcat" (JavaWorld, December 2004). 4. Alternative approach: In an Apache-Tomcat setup, a Tomcat instance called Tomcat Worker is configured to implement load balancing. 5.Clustering and Load Balancing support is provided in Tomcat 5 (http://www.onjava.com/lpt/a/4649) 6.A good exmaple of how to configure load balancing of apache+tomcat is: http://raibledesigns.com/tomcat/ 但是应该注意的问题是:必须采用jk_mod 而不是jk_mod2,jk_mod2还有些问题。如果不考虑负载平衡,可以采用jk_mod2。jk2已经被宣布不再支持了,参见 http://apache.freelamp.com/jakarta/tomcat-connectors/jk2/binaries/win32/ |
| 标签: apache,tomcat |

