HttpClusterServlet

The HttpClusterServlet comes with the WebLogic server. Like other servlets, it is used to extend the functionality of the WebLogic serverit cannot be used on its own. The primary purpose of the HttpClusterServlet is to distribute HTTP requests among the members of a cluster.

This facilitates two design goals of clusters:

Load Balancing

HTTP requests can be distributed evenly among the members of a cluster.

Failover

If one HTTP server in a cluster dies, the other members of the cluster can assume its responsibilities. The assumption of responsibilities is transparent to the client process.

In addition, the HttpClusterServlet also provides connection pooling, in which connections are left enabled, thereby saving on startup costs, and keep-alives, in which client and server remain connected through multiple client requests. By eliminating the overhead required to re-establish the connection with each request, performance is improved.

Installation

The HttpClusterServlet must be registered within the XML deployment descriptor of the application it is going to cluster. The class name for the servlet is "weblogic.servlet.internal.HttpClusterServlet."

 <servlet> <servlet-name>HttpClusterServlet</servlet-name> <servlet-class> weblogic.servlet.internal.HttpClusterServlet </servlet-class> . . . other configuration parameters . . . </servlet> 

The defaultServer is a list of host IPs and port numbers . The server name is given first, followed by the port for regular HTTP communication, optionally followed by the port for SSL communication. For example:

 <init-param> <param-name>defaultServers</param-name> <param-value> s1:7010:7010s2:7010:7020s3:7010:7020 </param-value> </init-param> 

The connectionTimeout parameter is the number of seconds that a server will wait before concluding that the client has disconnected for some reason.

 <init-param> <param-name>connectionTimeout</param-name> <param-value>30</param-value> </init-param> </servlet> 

The numOfRetries parameter is the number of connection attempts a server will make before concluding that the connection is broken.

 <init-param> <param-name>numOfRetries</param-name> <param-value>5</param-value> </init-param> </servlet> 

The secureProxy parameter may be set to OFF or ON. It indicates whether SSL communication is enabled between the members of the cluster. For example:

 <init-param> <param-name>secureProxy</param-name> <param-value>ON</param-value> </init-param> 

The DebugConfigInfo parameter is a toggle indicating whether the server will write out debugging information. For example:

 <init-param> <param-name>DebugConfigInfo</param-name> <param-value>ON</param-value> </init-param> </servlet> 

Example XML configuration files are available online at:

http://www.bea.com/wls



BEA WebLogic Server Administration Kit
BEA WebLogic Server Administration Kit (Prentice Hall PTR Advanced Web Development)
ISBN: 0130463868
EAN: 2147483647
Year: 2002
Pages: 134
Authors: Scott Hawkins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net