In this Fusion Middleware Training article, you will learn the following
Basic cluster architecture
Benefits of Oracle WebLogic cluster
Multi-tier cluster architecture
Communication among clustered server instances
Key criteria for selecting suitable cluster architecture
Oracle WebLogic cluster introductionWhat is a cluster? Benefits of clustering HTTP clustering and proxy plug-in Cluster architecture Cluster communication |
|
So what exactly is a weblogic cluster in Oracle Fusion Middleware?
It is a logical group of managed servers within a domain. It Supports features to provide high availability for the following
Whole Servers
Web Applications and services
EJB Applications
JMS
JDBC resources
What exactly does clustering provide ?
Feature |
Description |
Scalability |
It provides more capacity for an application by adding servers, without having to make major architectural changes |
Load Balancing |
It distributes work (client requests and so on) across the members of a cluster. |
Application failover |
When an object in an application that is performing a task becomes unavailable, the object from the application in another server takes over to finish the job. |
Availability |
After a system failure on one server, it automatically continues ongoing work on another server. |
Migration |
After a system failure on one server, it continues ongoing work by moving the component to another server |
The following types of objects can be clustered:
Servlets
JSP
EJB
Remote Method Invocation (RMI) objects
Java Messaging Service (JMS) destinations
Java Database Connectivity (JDBC) connections
What are Proxy Servers for HTTP Clusters ?
Proxy servers are used to provide load balancing and failover for a cluster. They:
Are the client’s first level of interaction with the cluster
Give the cluster its single server appearance
A proxy server can be either software based or hardware based
A software-based proxy server may be a WebLogic servlet, Web server plug-in, or a third-party application
A hardware-based proxy server is typically a physical load balancer
High Availability for EJBsWebLogic provides the EJB client applications with cluster-aware stubs that transparently perform load balancing and failover. You can enable and configure clustering for each EJB using the application deployment descriptor weblogic-ejb-jar.xml. |
|
Load-Balancing Clustered EJB Objects
-
WebLogic Server supports the following load-balancing algorithms for clustered EJB objects:
-
Round-robin
-
Weight-based
-
Random
-
Parameter-based routing (programmatic)
-
Server affinity configuration enables calls to objects to remain with the same server and minimizes client-side load balancing.
Road Map
-
Oracle WebLogic cluster introduction
-
Cluster architecture
-
Considerations for selecting an appropriate cluster architecture
-
Basic cluster architecture
-
Multitier cluster architecture
-
Proxy servers
-
Cluster communicatio
Selecting a Cluster Architecture
Consider the following factors when selecting a suitable architecture:
Performance
Efficient state persistence
Optimal load balancing
Effective failover
Reliable communication
There are two primary cluster architectures to choose from:
Basic cluster architecture
Multitier architecture
Applications are generally deployed in multiple tiers, each tier representing a distinct functionality:Web tier Presentation tier Business or object tier WebLogic provides clustering support for all three tiers. Other services, such as JMS and JDBC, can take advantage of clusters. The load balancing and failover operations for these services are handled differently. A basic cluster architecture combines static HTTP, presentation logic, business logic, and objects into one cluster . |
|
So what are the advantages of clusters in Fusion Middleware
Easy administration
Flexible load balancing ó Robust security
And what are the disadvantages of clusters in Oracle Fusion Middleware
It cannot load-balance EJB method calls.
Load-balancing across the tiers may become unbalanced.
The Web tier and the business logic with services can be separated into two clusters.
Multi-tier Cluster Architecture
What is a basic Cluster Proxy Architecture
This is similar to the basic cluster architecture, except that static content is hosted on HTTP servers
Multi tier Cluster Proxy ArchitectureThis is similar to the multitier cluster architecture, except that static content is hosted on HTTP servers |
Proxy Web Server Plug-In Versus Load Balancer
There are many advantages to using a physical load balancer instead of the proxy plug-in:
There is no need to configure the client plug-ins.
It eliminates the proxy layer, thereby reducing the number of connections.
There are more sophisticated load-balancing algorithms
There are a number of disadvantages as well for Clusters in Oracle Fusion Middleware
Additional administration
Explicit configuration of “sticky” sessions for stateful Web applications
Proxy Plug-Ins
Proxy plug-ins:
Delegate dynamic content requests to WLS servers and balance load
across a cluster in a round-robin fashion
Route HTTP requests to back-end WLS instances based on session cookie or URL rewriting
Avoid routing to failed servers in the cluster
Oracle HTTP Server containsmod_wl_ohs, which is a plug-in for WLS by default.
WLS provides plug-ins to other major Web servers as well.
OHS as a Proxy Web Server
Oracle HTTP Server (OHS) is a Web server that:
Is based on Apache
Serves static and dynamic content
Supports content generation in many languages, such as Java, C, C++, PHP, PERL, or PL/SQL
Contains a WebLogic Server plug-in (mod_wl_ohs) by default
Can be easily integrated with other Oracle Fusion Middleware components
Can be managed using the Fusion Middleware Control along with other components
Request Flow When Using OHS
The client sends an HTTP request to OHS for access to a Java EE application.
The mod_wl_ohs plug-in at OHS receives the request and determines from the cookie (in request) which WLS server should serve the request.
If no cookie exists, the request is assigned to the next available WLS server in the cluster (round-robin algorithm).
The WLS server that responds places the appropriate cookie in the response.
OHS routes the response to the client (with the cookie).
WLS HttpClusterServlet
HttpClusterServlet:
Is deployed in the default Web application of the proxy server
Delivers client requests in round-robin style to servers in the cluster
Server Communication in a Cluster
-
WebLogic Server instances in Fusion Middleware cluster communicate with one another using:
-
IP sockets, which are the conduits for peer-to-peer communication between clustered server instances
-
IP unicast or multicast, which server instances use to broadcast availability of services and heartbeats that indicate continued availability
-
Multicast broadcasts one-to-many communications among clustered instances.
-
Unicast is an alternative to multicast to handle cluster messaging and communications. The unicast configuration is much easier because it does not require cross-network configuration that multicast requires
One-to-Many Communications
Oracle WebLogic Server uses one-to-many communication for:
-
Clusterwide JNDI updates
-
Cluster “heartbeats”
Because all one-to-many communications occur over IP multicast, when you design a cluster, consider the following factors:
-
If your cluster spans multiple subnets, your network must be configured to reliably transmit messages.
-
A firewall can break IP multicast transmissions.
-
The multicast address should not be shared with other applications.
-
Multicast storms may occur.
Considerations When Using Unicast
Unicast messaging type:
-
Is much easier to configure because it does not require cross-network configuration that multicast requires
-
Reduces potential network errors that can occur from multicast address conflicts
You cannot mix and match cluster messaging types within a cluster
Peer-to-Peer Communications
Oracle WebLogic Server uses peer-to-peer communications for:
-
Accessing nonclustered or pinned objects that reside on a remote server instance in the cluster
-
Replicating HTTP session states and stateful session EJB states between a primary and a secondary server
-
Accessing the clustered objects that reside on a remote server instance (typically, in a multitier cluster architecture)
Clusterwide JNDI Naming Service
Each WebLogic Server in a cluster builds and maintains its own local copy of the clusterwide JNDI tree, which lists the services offered by all members of the cluster.
Name Conflicts and Resolution
Cluster-level JNDI conflicts may occur when new services are added to the cluster.
In case of name conflicts, local binding may succeed, but the binding of other object names from other servers will fail.
To avoid cluster-level JNDI conflicts, you must deploy all replica-aware objects to all WebLogic Server instances in a cluster