Tuesday, February 17, 2015

Weblogic Clusters basics -I

A WebLogic Server cluster consists of multiple WebLogic Server server instances running simultaneously and working together to provide increased scalability and reliability. A cluster appears to clients to be a single WebLogic Server instance. The server instances that constitute a cluster can run on the same machine, or be located on different machines. You can increase a cluster’s capacity by adding additional server instances to the cluster on an existing machine. Each server instance in a cluster must run the same version of WebLogic Server.




A WebLogic Server cluster provides these benefits:

   Scalability

     You can add server instances to a cluster without interruption of service—the application continues to run without impact to clients and end users.
   

High-Availability

    In a WebLogic Server cluster, application processing can continue when a server instance fails. You “cluster” application components by deploying them on multiple server instances in the cluster—so, if a server instance on which a component is running fails, another server instance on which that component is deployed can continue application processing.


How Failover works on cluster:

 WebLogic Server maintains information about state using techniques called session replication and replica-aware stubs. When a particular object unexpectedly stops doing its job, replication techniques enable a copy of the object pick up where the failed object stopped, and finish the job.

How Loadbalancing works on cluster:

Load balancing is the even distribution of jobs and associated communications across the computing and networking resources in your environment. For load balancing to occur:
  • There must be multiple copies of an object that can do a particular job.
  • Information about the location and operational status of all objects must be available.
    WebLogic Server allows objects to be clustered—deployed on multiple server instances—so that there are alternative objects to do the same job. WebLogic Server shares and maintains the availability and location of deployed objects using unicast, IP sockets, and JNDI.

 Different types of objects can clusterd below is the list and how:


Web applications can consist of different types of objects, including Enterprise JavaBeans (EJBs), servlets, and Java Server Pages (JSPs). Each object type has a unique set of behaviors related to control, invocation, and how it functions within an application. For this reason, the methods that WebLogic Server uses to support clustering—and hence to provide load balancing and failover—can vary for different types of objects. The following types of objects can be clustered in a WebLogic Server deployment:

    Servlets

    JSPs

    EJBs

    Remote Method Invocation (RMI) objects

    Java Messaging Service (JMS) destinations


Different object types can have certain behaviors in common. When this is the case, the clustering support and implementation considerations for those similar object types may be same. In the sections that follow, explanations and instructions for the following types of objects are generally combined:

    Servlets and JSPs

    EJBs and RMI objects


Servlets and JSPs

WebLogic Server provides clustering support for servlets and JSPs by replicating the HTTP session state of clients that access clustered servlets and JSPs. WebLogic Server can maintain HTTP session states in memory, a file system, or a database.



  • In-memory replication
    Using in-memory replication, WebLogic Server copies a session state from one server instance to another. The primary server creates a primary session state on the server to which the client first connects, and a secondary replica on another WebLogic Server instance in the cluster. The replica is kept up-to-date so that it may be used if the server that hosts the servlet fails.


JDBC-based persistence
In JDBC-based persistence, WebLogic Server maintains the HTTP session state of a servlet or JSP using file-based or JDBC-based persistence.