Introduction to WebLogic Server Clustering
Undoubtedly the two most important attributes of robust distributed applications are their capacity to scale and their availability. Effective application services must be able to meet the ever-increasing demands on application and Web servers through the addition of more servers to handle the load. Applications and services must be available 24 hours a day / 7 days a week, and increased loads or system failures should appear transparent to the end user.
WebLogic achieves scalability and high availability through the implementation of clusters. A cluster, loosely defined, is an environment where services are shared across two or more servers in a domain. Scalability is achieved through load balancing across these servers, and high availability is achieved by the failover capability of other servers to pick up the client processing in the event of a server's overload or failure.
For the developer, most components are built to the same specification whether or not they are to be deployed in clustered environments. There might be, however, considerations with servlets and JSPs, and EJB and RMI components. If your servlets and JSPs are going to use HTTP session state replication, you must remember to make your Web components serializable. If your EJBs are going to use replica-aware stubs, you must make changes to the deployment descriptor and recompile. For RMI component replication, you must generate the replica-aware stubs with the WebLogic RMI compiler.
Clustering, however, is not at all transparent to the WebLogic administrator. It is the job of the administrator to install and configure the servers participating in a cluster, and to deploy and configure applications onto that environment.
There are many different ways to configure a physical cluster, as defined by your needs and available resources. You will also find that configuring a cluster is as much an art form as it is a science. The following is a list of components and services that you can deploy and configure in a cluster:
HTTP session—
Replication provided for failover of the client's session in servlets and JSPs.
EJB components and RMI objects—
Replication provided through replica-aware stubs distributed among multiple application servers.
JMS service—
Scalability achieved through distributed JMS destinations and connection factories (a new feature since version 7; however, no failover support is yet provided).
JNDI service—
Replication provided through a clusterwide JNDI tree.
JDBC data sources—
Load balancing achieved via clustered connection pools.
This chapter breaks down clustering into two sections:
|