Chapter 7 Cluster Tuning
Web applications in a clustered deployment can provide better performance since multiple machines can handle more load than one. Clusters also provide high availability: if one machine goes off-line, clients can connect to another server in the cluster. To run your Web application in a cluster, you must configure a mechanism to support load balancing of HTTP requests, and optionally failover. For more information, see "Clustered Web applications" in Chapter 21, "Creating Web Applications," in the EAServer Programmer's Guide.
Chapter 5, "Web Application Tuning" describes the Web application settings that you can tune for single-server deployments. In a clustered deployment, these additional settings affect performance:
In a clustered deployment, EAServer replicates user session data stored in HTTP sessions so that the same data is available on other servers in the cluster. Replication can use a remote database server or in-memory storage.
If using in-memory replication, EAServer replicates data between mirror pairs , that is, a pair of servers configured to share the same user session. In-memory replication can perform better than using a database, but requires more memory on each server. Specify a cache size to constrain the memory required by the cache, and specify a timeout to free up memory used by idle sessions. To set these parameters, follow the instructions in "Clustered Web applications" in Chapter 21, "Creating Web Applications," in the EAServer Programmer's Guide.
If using database replication, all servers in the cluster store session data in a remote database. This mechanism can perform slower than in-memory replication, but requires less memory. Also, EAServer can share a client's session data on more than two servers. If using this technique:
In the default configuration, EAServer validates a client's HTTP session during each request. In a clustered deployment, session validation is more resource intensive since EAServer stores the session in a database or using a replicated cache. If you enable lazy validation, EAServer validates the session only when a servlet or JSP calls ServletRequest.getSession() or ServletRequest.getSession(boolean). To enable this setting, set the com.sybase.jaguar.webapplication.lazydistributedhttpsessionvalidation Web application property to true.
Lazy validation can improve performance. However, enabling lazy authentication has the following side effects:
| Copyright (C) 2004. Sybase Inc. All rights reserved. |
| |