Previous | Home | Next
Working with clusters
Clusters consist of one or more application servers that run the same applications. The configuration of each server can be unique.
Before creating a cluster, consider the number of servers to add to the cluster, the nodes on which they will be created, and how the workload is distributed across the servers.
Work is distributed across the servers in the cluster based on weights assigned to each application server. If all cluster members have identical weights, work is distributed among the cluster members equally. Servers with higher weight values are given more work.
Routing preference formula...
% routed to Server1 = weight1 / (weight_1 + weight_2 +...+ weight_n)
In the formula, n represents the number of cluster members in the cluster.
Create application server clusters
When creating a cluster, we have the option to create an empty cluster (no servers) or to create the cluster with one or more servers. The first application server added to the cluster acts as a template for subsequent servers. We can create the first server during the cluster creation process, or we can convert an existing application server. The rest of the servers must be new and can be created when you create the cluster or added later.
When creating a cluster, it is possible to select the template of an existing application server for the cluster without adding that application server into the new cluster. If we need to change the attributes of the servers in your cluster after the cluster is created, change each server individually. For this reason, consider creating an application server with the server properties you want as a standard in the cluster first, then use that server as a template or as the first server in the cluster.
Cluster and cluster member options
When creating a new cluster, we have the following options to consider:
- Prefer local
A request to an EJB must be routed to an EJB on the local node if available. This is the default setting and generally results in better performance.
- Configure HTTP session memory-to-memory replication (create a replication domain) WAS supports session replication to another WAS instance.
In this mode, sessions can replicate to one or more WAS instances to address HTTP Session single point of failure.
When creating a cluster, we can elect whether to create a replication domain for the cluster. The replication domain is given the same name as the cluster and is configured with the default settings for a replication domain. When the default settings are in effect, a single replica is created for each piece of data, and encryption is disabled. Also, the web container for each cluster member is configured for memory-to-memory replication.
When creating a new cluster member, we have the following options to consider:
- Basis for first cluster member
We can add application servers to the cluster when you create the cluster or later.
The first cluster member can be a new application server or we can convert an existing application server so that it becomes the first cluster member. Subsequent application servers in the cluster must be created new. The first application server in the cluster acts as a template for the subsequent servers.
The options we have depend on how you create the cluster.
When you use the job manager, we have the option to convert an existing server to use as the first cluster member, or create an empty cluster and run additional jobs to add cluster members.
When you use the deployment manager, we can convert an existing server, create one or more new servers, or create an empty cluster.
The option to use an existing application server does not appear in the deployment manager dmgr console if you create an empty cluster and then add a member later. To convert an existing application server as the first server, specify that option when you create the cluster or use the job manager to create the cluster member.
To remove a server from a cluster, delete the server. Take this situation into consideration when you are determining whether to convert an existing server to a cluster.
- Server weight for each cluster member
The weight value controls the amount of work directed to the application server. If the weight value for this server is greater than the weight values assigned to other servers in the cluster, this server receives a larger share of the workload. The weight value represents a relative proportion of the workload assigned to a particular application server. The value can range from 0 to 20.
- Member weight:
Relative weight of this server in the cluster. Values are from 0 to 20. A 0 indicates that work is to be routed to this server only in the event that no other servers are available.
On z/OS, weight is used to balance some of the workload types, but others are balanced by the z/OS system:
- For HTTP requests, weights are used to distribute HTTP traffic between the web server plug-in and the controller handling the clustered application server. Assign a higher weight value to the application server to receive the HTTP traffic.
- For web services calls, information is transferred from a servant in one application server to a controller in another application server. The application server that receives the call has the highest weight value.
- Weight has no affect on Internet Inter-ORB Protocol (IIOP) requests. IIOP requests are distributed to the correct application server using the sysplex distributor.
Using the deployment manager dmgr console
To create a new cluster:
- Click...
Servers | Clusters | WebSphere application server clusters
- Click New.
- Enter the information for the new cluster :
- Enter a cluster name of your choice.
- Create first cluster member
The first cluster member determines the server settings for the cluster members.
The fields are:
Member Name: Enter the name of the new server to be added to the cluster. On z/OS, you are also asked for the short name for the server. Select Node: Node on which this new cluster member is created. Server weight: Assigns the weight for this server. Generate unique HTTP ports: Generates unique port numbers for every transport defined in the source server, so the resulting server created does not have transports that conflict with the original server or any other servers defined on the same node. Core Group: Because multiple core groups exist, select the core group for the cluster members to join. Only displays if we have multiple core groups defined. Select how the server resources are promoted in the cluster: How resources, such as data sources, are initially created in the cluster. Only available for the first cluster member. All other cluster members are based on the cluster member template, which is created from the first cluster member. We can select from the following options:
- Cluster, which indicates the resources defined can be used across all cluster members. Reduces the amount of configuration and management of resources. The cluster option is the default setting.
- Server, which indicates the resources are defined at the cluster member level. Useful to have different configuration settings for resources defined on each cluster member.
- Both, which copies the resources of the cluster member (server) level to the cluster level.
Select basis for first cluster member: If we click... Create the member using an application server template
...the settings for the new application server are identical to the settings of the application server template you select from the list of available templates.
If we click...
Create the member using an existing application server as a template
...the settings for the new application server are identical to the settings of the application server you select from the list of existing application servers. However, applications that are installed on the template server are not installed on the new servers.
If we click...
Create the member by converting an existing application server
... the application server you select from the list of available application servers becomes a member of this cluster. Applications that are installed on the existing server are automatically installed as new members of the cluster.
The only way to remove a server from a cluster is to delete the server. If we delete the cluster, all servers in the cluster are deleted.
If we click...
None. Create an empty cluster
...a new cluster is created, but it does not contain any cluster members.
Create additional cluster members We can add a member to a cluster when you create the cluster or after you create the cluster. A copy of the first cluster member that you create is stored as part of the cluster data and becomes the template for all additional cluster members that you create. To add a member, enter a new server name, select the node, and click Add Member. The new member is added to the list.
- When all the servers are entered, click Next. A summary window shows you what will be created.
- Click Finish to create the cluster and new servers.
- Save the configuration. Adding additional servers to the cluster
To add a server using the dmgr console:
- Click...
Servers | Clusters | WebSphere application server clusters
- Click the cluster name.
- Under the Additional Properties sections, click Cluster members.
- Click New. This action opens the same configuration window that was used when you created the cluster
- Enter the name of the new server to create, select the node, and select the options to use. Click Add Member.
- Click Next and then click Finish.
When an application server is added as a member to a server cluster, the modules installed on other members are also installed on the new member. We do not need to re-install or upgrade the application.
Using cluster member templates
When you created your cluster's servers, a server template was created for the cluster by copying the first cluster member's configuration. This template is then used when you create additional servers for that cluster. This situation is important to understand to get the results you expect when working with clusters.
To view a cluster's member templates using the dmgr console:
- Click...
Servers | Clusters | WebSphere application server clusters
- Click the cluster name.
- Under the Additional Properties sections, click Cluster members.
- Click Templates
These steps open a configuration window that lists the templates in this cluster. Typically, you only have one template, but we have additional templates if the cluster includes servers that are at different versions of WAS (versions 8.5, 8, or 7).
From this configuration window, we can view and modify the server attributes of the template.
If we modify the attributes, it is important to understand that existing cluster members are not affected. The template is only used for creating new cluster members.
To modify the attributes of a cluster's member using the dmgr console:
- Click...
Servers | Clusters | WebSphere application server clusters
- Click the cluster name.
- Under the Additional Properties sections, click Cluster members.
- Click the cluster member to open the server configuration window where we can make your change.
To make the same change to multiple cluster members, repeat these steps. Also, modify the same attributes in the cluster member template because new cluster members are created based on the template. If we do not change the cluster's template(s), additional cluster members do not match the existing members.
To modify the same server attribute(s) across all of a cluster's members, and we have several cluster members, one way to accomplish this task is using the administrative console and completing the following steps:
- cd cluster's templates.
- Click the cluster template and make your desired changes.
- Save your changes.
- Delete all of the members in the cluster.
- Recreate the members.
The new members are created from the updated cluster member template, and all of the cluster members have the same configuration.
Using the job manager
When creating an application server cluster from a job manager, we can either create an empty cluster and run subsequent jobs to add cluster members, or we can convert an existing application server as your first cluster member.
To create a cluster with one or more new application servers in one step, use the dmgr console instead of the job manager.
Building a cluster using the job manager is done in two major steps:
- Create the cluster.
- Create the cluster members.
Creating the cluster
To create an application server cluster from the job manager:
- Click Jobs | Submit.
- Click the Create cluster job type.
- Select the deployment manager as the job target.
Enter the user ID and password with administrative authority on the deployment manager.
- Specify the job parameters
- Specify the name of the new cluster.
Specify the options for the new server
Optionally:
Prefer local Selected, which is true (the default), or clear the check for false Cluster type The options are:
- APPLICATION_SERVER (the default)
- PROXY_SERVER
- ONDEMAND_ROUTER
Leave blank to create an application server cluster.
Short name Cluster short name on z/OS platforms. Create domain For creating true or false (the default). Convert server settings To use an existing server as the first member of the cluster, complete the server node and server name fields. The other fields are optional. If we specify the cluster name, and take all the other defaults, you create an empty cluster. When creating an empty cluster, it does not appear in the deployment manager console until you submit a job to add a member to it.
- Schedule the job.
Take the defaults for the job schedule. The defaults execute the job once. Click Next.
- Review the summary, and click Finish.
Monitor the status of the job and ensure it completes successfully.
Creating the cluster members
To create new application server cluster members from the job manager:
- Click Jobs | Submit.
- Click the Create cluster member job type.
- Select the deployment manager as the job target.
Enter the user ID and password with administrative authority on the deployment manager.
- Specify the job parameters:
- Specify the name of the cluster.
- Specify the node where the cluster member will be created.
- Specify the name for the new cluster member.
Specify the options for the new server
Optionally:
Member weight Relative weight of this server in the cluster. Values are from 0 to 20. A 0 indicates that work is to be routed to this server only in the event that no other servers are available. Member UUID.
Generate unique ports The default is selected for this option, which generates unique ports. Replicator entry Selecting this option adds a replicator entry for this server in the cluster replication domain. The default is not selected, which is a false value. Short name The short name for the server on z/OS. If this is the first server in the cluster, or to specify a different node or core group, expand the additional job parameters section. It contains settings to specify the template information and the option to specify a node and core group other than the default.
- Schedule the job. Use the defaults for the job schedule. The defaults execute the job once. Click Next.
- Review the summary, and click Finish. Monitor the status of the job and ensure it completes successfully.
View the cluster topology
The deployment manager dmgr console provides a graphical view of the existing clusters and their members. To see the view:
- Click...
Servers | Clusters | Cluster Topology
- Expand each category.
Cluster topology view
- Select a server to get to the configuration window for the application server.
Managing clusters
Application servers within a cluster can be managed as independent servers. A second option is to manage all of the servers in the cluster as a single entity.
Using the dmgr console
To display and manage the application server clusters:
- Click...
Servers | Clusters | WebSphere application server clusters
- Select each cluster to work with, and select one of the following options:
Start Start all servers in the cluster. Stop Stop all servers in the cluster. Allows the server to finish existing requests and allows failover to another member of the cluster. Ripplestart Stop and then start all servers in the cluster one at a time. ImmediateStop Stop all servers immediately. Delete Deletes the cluster and all servers in the cluster.
Using the job manager
The job manager provides several job types that help you manage clusters:
- Delete cluster
- Delete cluster member
- Start cluster: Use this option to start all servers in a cluster:
- We can specify that a ripplestart be used (specify true or false). The default is that a ripplestart is not used. A ripplestart stops and then restart each server.
- We can also specify a timeout value. If the timeout expires and all servers are not started, the state of the cluster is reported without waiting any longer for the servers to start.
- Stop cluster
We can also specify a timeout value. If the timeout expires and all servers are not started, the state of the cluster is reported without waiting any longer for the servers to start.