Create clusters
A cluster is a set of application servers that you manage together as a way to balance workload. Before creating a cluster:
- Review the content of the topic "Clusters and workload management", especially the information about setting cluster weights.
- Decide if we want enterprise bean requests routed to the node on which the client resides.
- Decide to use HTTP memory-to-memory replication.
- Determine the appropriate configuration settings for the first cluster member. A copy of the first cluster member that we create is stored as part of the cluster data and becomes the template for all additional cluster members that we create.
- Decide on which node we want the first cluster member to reside.
Create a cluster if we need to:
- Balance the client requests across multiple application servers.
- Provide a highly available environment for the applications.
A cluster enables you to manage a group of application servers as a single unit, and distribute client requests among the application servers that are members of the cluster.
To create a cluster:
- In the console, click...
Servers > Clusters > WebSphere application server clusters > New
The Create a new cluster wizard starts.
- Specify a name for the cluster.
- Select Prefer local to enable host-scoped routing optimization. This option is enabled by default. When this option is enabled, if possible, EJB requests are routed to the client host. This option improves performance because client requests are sent to local enterprise beans.
Supported configurations: If we enable the preferLocal optimization, the deployment manager must be running to affect the configuration. If the deployment manager is shut down, preferLocal optimization is not performed and requests might be dispersed across all the members of the cluster.
- Select Configure HTTP session memory-to-memory replication if we want a memory-to-memory replication domain created for this 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.
If the WAS cluster has session Memory to Memory replication enabled, then the plug-in configuration file for that server cluster must have the GetDWLMTable property set to true.
To change these settings for the replication domain, click...
Environment > Replication domains > replication_domain_name
To modify the web container settings, click...
Servers > Clusters > WebSphere application server clusters > cluster_name > Clusters members > cluster_member_name
Then, in the Container settings section, click...
Web container settings > Web container >Session management > Distributed environment settings in the console
If we change these settings for one cluster member, you might also need to change them for the other members of this cluster.
- Click Next.
- Choose whether to create an empty cluster or to create the first member of the cluster.
If we decide to create an empty cluster, to add members to this cluster, in the console, click...
Servers > Clusters > WebSphere application server clusters > cluster_name > Clusters members > New
To create an empty cluster:
- Select None. Create an empty cluster.
- Click Next to display a summary of the defined cluster.
- Click Finish to create the cluster, or click Cancel if you decide not to create this cluster.
When we create the first cluster member, remember that a copy of the first cluster member that we create is stored as part of the cluster data and becomes the template for all additional cluster members that we create.
- Specify the name of the first cluster member.
- Select the node on which we want this cluster member to reside.
- Specify the weight value for the cluster member. The weight value controls the amount of work that is 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, then 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.
- 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 that should 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.
- Select Generate unique HTTP ports to generate unique port numbers for every HTTP transport defined in the source server. When this option is selected, which is the default setting, this cluster member does not have HTTP transports or HTTP transport channels that conflict with any of the other servers defined on the same node. If we unselect this option, all of the cluster members will share the same HTTP ports.
- Select the core group to which we want this cluster member to belong. We are prompted for the core group only if we have more than one core group defined for this cluster.
- Select one of the following options to determine how the server resources are promoted in the cluster.
- Cluster to move the resources of the first cluster member to the cluster level. The resources of the first cluster member replace the resources of the cluster.
- Server to maintain the server resources at the new cluster member level. The cluster resources remain unchanged.
- Both to copy the resources of the cluster member (server) to the cluster level. The resources of the first cluster member replace the resources of the cluster. The same resources exist at both the cluster and cluster member scopes.
- Select one of the following options as the basis for the first cluster member.
- Create the member using an application server template.
- Create the member using an existing application server as a template.
- Create the member by converting an existing application server.
Avoid trouble: We can only add an existing application server to the cluster if you select that server as the first cluster member. We cannot add other existing application servers to that cluster after we create the first cluster member. If we add an existing server to a cluster, the only way to remove that server from the cluster is to delete the server. Therefore, you might want to use the existing server as a template for the first cluster member instead of as the cluster member. If we keep the original application server out of the cluster, we can reuse that server as the template if we need to rebuild the configuration.gotcha
- Click Next.
- Create additional cluster members. Before creating additional cluster members, check the configuration settings of the first cluster member. These settings are displayed on the Create additional cluster members panel of the Create a new cluster wizard. For each additional member to create:
- Specify a unique name for the member. The name must be unique within the node.
- Select the node to which to assign the cluster member.
- Specify the weight we want given to this member.
The weight value controls the amount of work that is directed to the application server. If the weight value for the server is greater than the weight values assigned to other servers in the cluster, then the server receives a larger share of the workload. The value can range from 0 to 20.
- Select Generate unique HTTP ports to generate unique port numbers for every HTTP transport defined in the source server.
- Click Add member. We can edit the configuration settings of any of the newly created cluster members other than the first cluster member, or we can create additional cluster members. Click Previous to edit the properties of the first cluster member. The settings for the first cluster member become the settings for the cluster member template that is automatically created when creating the first cluster member.
- When you finish creating cluster members, click Next.
- View the summary of the cluster and then click Finish to create the cluster, click Previous to return to the previous wizard panel and change the cluster, or click Cancel to exit the wizard without creating the cluster.
- To further configure a cluster, click...
Servers > Clusters > WebSphere application server clusters > clustername
Only the Configuration and Local Topology tabs appear until you save the changes.
- Click Review to review the cluster configuration settings. Repeat the previous step if we need to make additional configuration changes.
- If we do not want to make any additional configuration changes, select Synchronize changes with Nodes and then click Save. Your changes are saved and synchronized across all of the nodes.
Avoid trouble: If we click Save, but do not select Synchronize changes with Nodes, when you restart the cluster, the product does not start the cluster servers because it cannot find them on the node. To always synchronize the configuration changes across the nodes, we can select Synchronize changes with Nodes as one of the console preferences.gotcha
- Restart the cluster.
Results
You have created a cluster to which we can assign work requests. The Runtime and Local Topology tabs appear the next time you access this page.
What to do next
- We can click Servers > Clusters > WebSphere application server clusters > cluster_name > Clusters members in the console, and then click the name of a cluster member to view all of the configuration settings for this cluster member. We can then use this page to change some of the configuration settings for the selected cluster member.
For example, if we do not need to have all of the cluster member components start during the cluster startup process, you might want to reconfigure the cluster members, such that the Start components as needed is selected. This option is not selected when a new cluster member is created. Selecting this option can improve cluster startup time, and reduce the memory footprint of the cluster members.
Avoid trouble: Before selecting this option, verify that any other WebSphere products, that you are running in conjunction with this product, support this functionality.gotcha
(zos)
Deprecated feature: The default addressing mode for a new server is 64-bit. We can deselect the Run in 64-bit mode field if use 31-bit addressing mode. However, support for running a server in 31-bit mode is deprecated.depfeat
- Use the console to view or change the configuration settings for a cluster. For example, if you are running in a high availability environment, we can click...
Servers > Clusters > WebSphere application server clusters > cluster_name > Enable failover of transaction log recovery
This option allows the recovery of transactions to failover from one cluster member to another.
- Create additional cluster members.
If we create a cluster member by converting an existing application server that is a member of a bus, migrate the messaging engine in the server to the scope of a cluster. To do this, use wsadmin migrateServerMEtoCluster. Do not delete the messaging engine at server scope and recreate it a cluster scope, because those actions prevent the messaging engine from working with previously configured destinations.
- Start the cluster.
- Use scripting to automate the task of creating clusters.
- Create a static routing table to temporarily handle IIOP routing for the cluster if the high availability infrastructure is disabled.
Subtopics
- Create a cluster: Basic cluster settings
- Create a cluster: Create first cluster member
- Create a cluster: Summary settings
- Create a cluster: Create additional cluster members
- Server cluster collection
- Enable static routing for a cluster
- Disable static routing for a cluster
- (zos) Clusters on which stateful session beans will be deployed
Related concepts
Introduction: Clusters
Related tasks
Create clusters Cluster member templates collection Cluster configuration scripts ClusterConfigCommands (AdminTask) migrateServerMEtoCluster command