Failover and detecting unavailable application servers

The redirector provides failover for Web applications. However, to achieve transparent failover, you must mark your Web application as distributable in EAServer using EAServer Manager. This allows the HttpSession object created by the Web application to be visible to other application servers. See Chapter 21, “Creating Web Applications,” in the EAServer Programmer’s Guide for information about distributable Web applications.

When a request arrives from a client, the Web server redirector sends it to an EAServer application server. The redirector selects the server based on a round-robin scheme where each new request from a client is directed to the next available application server that can service the request. If the application server is not responding to a request from a client (for example, temporarily down for administrative reasons), the redirector marks the application server unavailable for a fixed period of time and sends the request to the next application server that can service the request.

If a request arrives from a client and an application server has been unavailable for more than the retry value, the redirector sends the request to this unavailable server. If the server responds, it is marked as “available.”

The default retry value is 300 seconds (five minutes). You can change the default by adding this directive to the redirector configuration file:

Connector.RetryAfter <seconds>

where seconds is the number of seconds the application server is unavailable.

If the redirector has connected successfully to an application server, and while awaiting the response, the network connection is broken between the redirector and EAServer, the redirector does not attempt to restore the connection. The client must retry the request.

See “Editing the redirector configuration file” on page § (iPlanet, Netscape, and Sun Java System), § (Apache), or § (IIS) for more information.