Clusters




general diagram of Cluster











IBM WebSphere application server clusters

Concept 1:
Clusters in WAS ND are groups of application servers that reside on nodes (ex. separate hardware, JVMs) while automatically providing load balancing and routing rules to proxy servers/IBM HTTPServer(webservers) that are also defined within the WAS ND configuration.  All of this configuration is done through a central console called deployment manager which communicates to nodes (often residing across network boundaries) using remote agents (called node agents). These node agents provide communication channels that allows the deployment manager to deploy proxy/webserver servers, application servers and clusters on remote hardware and concurrently provide rules for proxies/webserver about how to route requests through proxies/webserver to application servers.
It is a set of AppServers having same applications Installed,grouped locally for WorkLoadManagement (WLM)- Grouping of AppServers under a single application Every cluster member must have the same configuration and same version.We can say each cluster member is the clone to one another.

Concept 2: 
Clusters enable enterprise applications to scale beyond the amount of throughput capable of being achieved with a single application server. 
Clusters also enable enterprise applications to be highly available because requests are automatically routed to the running servers in the event of a failure. The servers that are members of a cluster can be on different host computers. In contrast, servers that are part of the same node must be located on the same host computer. Clustering is done in a cell that contains a deployment manager and one or more nodes that are managed by the deployment manager. A cell can include one or more clusters.

There are 2 types of Clustering

a) Vertical Clustering
b) Horizontal Clustering


a)Vertical Clustering: 

















We can Deployed the application on same machine/Local machine/same box. In this clustering machine failover is not possible
means if one server will fails the other server or other machine will handles the request but if Machine will fails it cannot take back and handles that request.

b) Horizontal Clustering:

















Grouping of App servers in which one App server should be on one node and Another App server should be on Another node
means we can deployed the applications on different machines or remote machine.

Ex: One App server Machine 1 should be in India and Other App server Machine 2 should be in US at a particular point of time if we want to deployed the application on Machine 1 in India through US we have to know about the IP address of the Machine 1 then only it is possible to deploy the application in case that machine 1 will fails another machine2 will takes care and handles the request in this clustering Machine fail-over is possible.

Cluster Creation Steps:
- Navigate Servers --> Clusters --> WebSphere application server clusters.


- Click New --> Enter the “Cluster name” and click Next


- Enter the Cluster member name and select the node where you want to create.


- There is option to create the member using an application server template, using an existing JVM as a template, convert existing JVM as a cluster member or create an empty cluster.
- We can select default template, click Next
- You can create additional cluster member on next screen if you need, click Next.


- Review the summary and click Finish
- Review, synchronize and save the configuration changes.


- If you have multiple JVM’s in a cluster and need to restart all, then you can restart the whole cluster

Note: if you need to create JVM in existing cluster then you can do as following.

- Go to Servers >> Clusters >> WebSphere application server clusters
- Click  the Cluster from the list where you want to create a JVM
- Click “Cluster members” under Additional Properties
- Click New
- Enter the JVM name >> select the node where you want to get it created and click “Add Member.”


Dynamic Clustering: 
A dynamic cluster is the new Intelligent Management feature, which enables WebSphere 8.5 to stop dynamically, start and allocate resource as and when, required for an application running on a dynamic cluster.

Operation Mode:
Manual- it’s similar to the normal application server environment with a static cluster. The manual operation mode is as good as a WebSphere application server traditional cluster.
Supervised- provides information and recommendation for actions that WebSphere administrator can approve or deny.
Automatic- the intelligent management takes action automatically. Dynamic operations environment handles add/remove operation and provisioning.

Creating Dynamic Cluster:
- Login into Deployment Manager Console
  Go to Servers --> Clusters --> Dynamic clusters
- Select Operational mode as Automatic and click on New
  Select Server type as WebSphere application server and click on      Next.
- Leave default method – Automatically define cluster members with rules.
- Provide Dynamic cluster name – First Dynamic Cluster and click on Next.
- You can select multiple Node Group if you have, Leave default setting and click on Next
- Select dynamic cluster template as default and click on Next
- Specify dynamic cluster specific properties, We will leave the default settings as following and click on Next.
- Keep one instance started at all times – dynamic cluster will always be active with one instance.we ensure there is no application outage.
- Do not limit instances that can start- dynamic cluster will start all instances in a defined node as demand increases. By configuring this, we ensure all resources are utilized when demand is high.
- No isolation requirements- as we have only one Node Group we can continue with no isolation requirements.
- Review the configuration summary and click on Finish to create Dynamic Cluster.
- Save the configuration and synchronize changes with nodes. Once done, you can see newly created Dynamic cluster is listed.
- You can also see dynamic cluster member is created under Application servers and started one instance as we have selected to keep one instance started all times.
- Now in this dynamic cluster setup, one instance will always be running. However, as demand increase other cluster instance also will be started.

Features: 
There are a lot of benefits in having an application deployed in cluster mode, like:
1.It ensures that application is always available from one of the cluster members
2.High-availability if one or more JVM is down because requests are automatically routed to the running servers in the event of a failure.
3.No issue if one of the cluster JVM’s physical server is down
4.Enables enterprise applications to scale beyond the amount of throughput.
5.No or minimum downtime during restart
6.Easy maintenance
7.No need to deploy on multiple JVM instead just select the cluster as target

IMP Note: 
A cluster of application servers provides scalability, throughput, and failover. Web requests to the HTTP server are routed by the plug-in to servers in the cluster using a weighted or random round-robin algorithm. The plug-in configuration file contains information about clusters, members of the cluster (clones), and the applications hosted by the servers in the cluster. In addition, each cluster member has a weight that is stored in the configuration file.
The plug-in uses this weight in its routing algorithms to determine what percentage of incoming requests are routed to each cluster member.

Note 1:
IBM WebSphere Application Server Network Deployment does not support deployment of firewalls between components within a cell (for example, between the deployment manager and the nodes).
Note 2:
High availability configurations that include WebSphere Application Server clustering typically also include metadata repository clustering. The database cluster ensures that the metadata repository is not a single point of failure.
Note 3:
we can not change cluster name once its created.

Session Affinity
Whenever one request comes from the same client it should routed back to that particular server (or) same server.
Maintaining the state till the session closes .
Affinity means it happens repeatedly again and again
(OR)
Server ID is appended to session ID when HTTP Session is created its ID is passed back to browser as part of cookie or Url encoding .
When browser makes further request the cookie will be sent back to webserver. The webserver plug-in examines HTTP Session ID, Extracts Unique ID of cluster member handling Session and forwards the request.

With out Session Affinity : 
Plug-in is responsible to send requests based on weights
Maximum weights is 20
Request           Server1             Server2
    1                     4                        1
    2                     3                        1
    3                     3                        0
    4                     2                        0
    5                     1                        0
    6                     0                        0
    7                     4                        1

With Session Affinity :  
Ebay site having a link if we click link it is like a new request This request is coming from 1 server.

Request           Server1             Server2 
    0                     4                        1
    1                     3                        1
    2                     2                        1
    3                     2                        0
    4                     2                        0
    5                     2                        -1
    6                     1                        -1
    7                     0                        -2


Comments

Popular posts from this blog

Understanding SSL

Session Management Part-1

WebSphere Application Server