Table of Contents
This chapter defines a cluster as a part of a domain and describes the composition of a cluster and its relationship to the domain. In addition, it describes how to create, configure, change, and delete a cluster.
A cluster is a group of servers that run the same services in order to support load balancing for scalability and failover for stability.
Performance can be improved because multiple servers share the load and dynamic load balancing can be performed by adding or deleting servers to the cluster. Even if some servers fail, the remaining servers continue to function, so users are not aware of the failures. A Cluster can easily handle large loads and provide uninterrupted services.
A domain is a group of servers or clusters that provide services. A cluster is a group of servers that provide the same services. A domain can have multiple clusters. Servers in a cluster can be on the same machine or different machines. It is recommend to use servers on different machines, so that if one machine fails the other servers on other machines can continue to provide the services.
DAS manages a single domain. If there are multiple clusters in a domain, those clusters are managed by the same DAS.
A cluster consists of MSs that run the same services in a domain. Clusters usually contain multiple machines and support the following functions.
Load balancing distributes services across multiple servers to prevent a service from stopping due to excessive load and to improve the service response speed.
An environment where same services can be executed must be configured, and each server must know the location and status of the other servers.
If a server is shut down abnormally, another server takes over the services that the failed server was executing.
The server that takes over the services must be able to execute the same services and monitor the failed server. The server should also know about the failed server's service progress status.
To make this possible, it is recommended that all servers have the same applications deployed and registered on them and have the same resources. Servers in a cluster share the location and state of each server using multicast, and also share service progress in the event that a server fails. To improve resource efficiency, servers can be added to or removed from the cluster according to the load.
Some services cannot be clustered. The following are the services that can be clustered.
Service | Description |
---|---|
Servlets /Jsps | Web engines support web application clustering using the web server and HTTP session clustering. Refer to JEUS Web Engine Guide. "2.4. Configuring Web Server Load Balancing" for detailed information about web application clustering using the web server and refer to JEUS Session Management Guide. "Chapter 2. Distributed Session Servers" for information about HTTP session clustering. |
EJB | EJB engines support session beans, message-driven beans, entity beans, and timer service clustering. Refer to JEUS EJB Guide. "Chapter 6. EJB Clustering" for detailed information about clustering in EJB engines. |
JMS | JMS supports connection factory, destination, and durable subscriber clustering. Refer to JEUS MQ Guide. "Chapter 4. JEUS MQ Clustering" for detailed information about clustering in JMS. |
The following constraints should be considered when creating a cluster:
All the servers in a cluster must use the same version of JEUS.
Each server must belong to only one cluster.
Because resources cannot be shared across domains, all servers in a cluster must be in the same domain.
When configuring a domain, create a cluster by considering the types and priorities of services. Refer to "Adding a cluster" of "2.2. Configuring a Domain" for information about creating a cluster.
Cluster configurations can be divided into common server settings and cluster settings.
Common server settings allow all servers in a cluster to run the same services and are needed to create both clusters as well as individual servers.
Refer to JEUS Server Guide. "Chapter 2. JEUS Configuration" for detailed information on common server settings
The cluster settings are for load balancing, failover, configuring cluster communication, session servers, timer services, JMS resources, and for registering and deleting data sources.
If the configuration changes, restarting the entire cluster is recommended in case any of the settings requires a server restart.
Setting up a session server cluster
A distributed session server in a clustered environment can use both load balancing and failover.
There is no configuration to disable a distributed session server. When servers are clustered, a distributed session server is automatically configured across the servers.
Refer to JEUS Session Management Guide. "Chapter 2. Distributed Session Servers" for detailed information about distributed session servers and JEUS Session Management Guide. "2.10.3. Distributed Session Server Configuration Details" for detailed description and configuration of each item.
Setting up cluster timer service
This is used to set up a timer service in a clustered environment. Refer to JEUS EJB Guide. "Chapter 10. EJB Timer Service" for detailed information about setting up timer services.
Setting up clustered JMS resources
This is used to set up destination and durable subscriber in the cluster. Refer to JEUS MQ Guide. "4.3.1. Server Configuration" for detailed information about setting up JMS resources.
Registering and deleting data sources
Data sources that are registered in a cluster can be used by all servers in the cluster and the registration is performed dynamically. Deleting data sources that are registered in a cluster can also be performed dynamically. Data sources that are deleted from a cluster are not available to servers in the cluster.
Refer to JEUS Server Guide. "6.6. Dynamically Changing Data Source Related Configurations" for detailed information about using registered data sources and how to register and delete them.
New servers can be created with settings in a server template and added to a cluster. Set up a server template, and choose 'Dynamic Servers' on the cluster adding page. If users want to change settings of the cluster configured in 'Dynamic Servers', they need to change the cluster settings or the server template. For more information about a server template, refer to JEUS Server Guide. "2.4. Server Template Configuration".
A server template can be created using WebAdmin or the console tool.
Using WebAdmin
Click [Servers] and to go to the server and template list.
Click the [Add] button to the right of the 'Server Templates' to view the add template screen.
Specify the name of a template in 'Name' and other items and then click [OK] at the top right hand corner to save the settings.
The new template is listed in [Servers].
Using the console tool
Use add-server-template to specify detailed settings of a server template. Specify the name of a template and other settings. For more information, refer to JEUS Reference Book. "4.2.4.9. add-server-template".
Changes to the settings of a cluster created with dynamic servers can be made only in the cluster settings or the server template settings. The settings of one server cannot be changed individually unless a cluster is configured by adding individual servers. The name of each server takes the format of the the value specified in 'Server Name Prefix' followed by a number.
The listen address of each server is set to the value configured for each node in nodes.xml. To specify a node to locate dynamic servers in 'Node Names', use the configuration information of nodes.xml. Nodes are allocated based on the round-robin mechanism.
To add or delete a server, use 'Server Count' of the cluster setting. Servers cannot be added or deleted individually. The detailed setting of dynamic servers also cannot be changed individually but always updated based on the setting of the server template.
The number of servers in a cluster can be adjusted by adding or deleting servers based on the load.
This section describes how to add a server to the cluster using WebAdmin or jeusadmin, a console tool.
As the load increases, a cluster needs to scale by adding more servers. Adding a server with the same configuration as the existing servers is recommended because it will execute the same services.
The following are the steps for adding a server to a cluster in WebAdmin.
Click [Servers] from the left menu to go to the list of servers.
Click [Lock & Edit] to change to the configuration mode. Refer to JEUS WebAdmin Guide. "2.3.2. Menu" for detailed information about the configuration mode in WebAdmin.
The method for adding servers to a cluster depends on the manner a cluster is configured.
Configuring a cluster by creating servers and adding them
The following are the steps for creating servers and adding them to a cluster. Users can configure settings for a new server and select it in the list to add to a cluster.
On the Servers screen, click [Add] to go to [Basic] > [Basic Info]. Configure the settings for a new server and then click [OK].
Once a server is added to the server list, add it to a cluster. Click [Clusters] to go to the cluster list screen. Select a cluster from the list so that a server can be added.
Select the server in 'Servers' on the Cluster screen and then click [OK].
Configuring a cluster using the dynamic servers setting
The following are the steps for configuring a cluster using the dynamic servers setting. A server can be automatically added on the cluster settings page by changing the cluster settings.
To add servers by changing the cluster settings, click [Clusters] and go to the cluster list page.
In the 'Server Count' field under 'Dynamic Servers', enter a number of servers greater than the current one and then click [OK]. The number of servers is increased by the difference between the updated server count and the previous one.
Confirm the message that cluster settings have been changed, and then click [Apply Changes] to save the changes.
A message is displayed that a server or servers have been created and added to the cluster.
Click [Clusters] from the left menu, and then click [Start] of the cluster to start the servers.
Verify that the servers are running properly in the cluster by clicking [Monitoring] > [Servers].
The following are the steps for adding a server to the cluster using jeusadmin, a console tool. A cluster can be configured either by creating and adding a server or by using dynamic servers.
Configuring a cluster by creating servers and adding them
The following are the steps for creating servers and adding them to a cluster.
Create a server (server2) to add to the cluster by using the add-server command.
Refer to JEUS Reference Book. "4.2.4.7. add-server" for detailed information about the add-server command.
[DAS]domain1.adminServer>add-server server2 -node node2 -addr 192.168.34.2 -port 9936
Successfully performed the ADD operatioin for server (server2).
Check the results using "list-servers or add-server"
Add server2 to the cluster(cluster1) by using the add-servers-to-cluster command.
Refer to JEUS Reference Book. "4.2.4.8. add-servers-to-cluster" for detailed information about the add-servers-to-cluster command.
[DAS]domain1.adminServer>add-servers-to-cluster cluster1 -servers server2
Successfully performed the ADD operation for The server list for cluster(cluster1)..
Check the results using "list-clusters cluster1 or add-servers-to-cluster cluster1"
Start the added server by using the start-cluster command. Refer to JEUS Reference Book. "4.2.3.45. start-cluster" for detailed information about the start-server command.
[DAS]domain1.adminServer>start-cluster cluster1
The cluster [cluster1] has been successfully started.
Check that server1 and server2 are running properly in 'cluster1' by using the serverinfo command.
[DAS]domain1.adminServer>serverinfo
Information about Domain (domain1)
==============================================================================================
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
| Server | Status | Node| PID | Clus| Latest Start | Need to| Listen Ports| Running |
| | |Name | | ter |Time / Shutdown |Restart | | Engines |
| | | | | | Time | | | |
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
| adminSe| RUNNING | N/A | 5360 | N/A | 2016-08-23 | false | base-192.168| jms, |
|rver(*) |(00:01:11| | | |(Tue) PM | |.34.3:9736 | ejb, web |
| |) | | | |03:53:28 KST | | http-server-| |
| | | | | | | |0.0.0.0:8088 | |
| | | | | | | |jms-internal-| |
| | | | | | | |0.0.0.0:9741 | |
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
| server1| RUNNING |node1| 6424 | clus| 2016-08-23 | false | base-192.168| jms, |
| |(00:00:03| | |ter1 |(Tue) PM | |.34.1:9836 | ejb, web |
| |) | | | |03:54:37 KST | | | |
--------+---------+-----+-------+-----+-----------------+--------+-------------+-------------+
| server2| RUNNING |node2| 3012 | clus| 2016-08-23 | false | base-192.168| jms, |
| |(00:00:03| | |ter1 |(Tue) PM | |.34.2:9936 | ejb, web |
| |) | | | |03:54:36 KST | | | |
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
==============================================================================================
Configuring a cluster using the dynamic servers setting
The following are the steps for configuring a cluster using the dynamic servers setting.
Use the modify-dynamic-servers command to add dynamic servers to a cluster. For details about using the modify-dynamic-servers command, refer to JEUS Reference Book. "4.2.4.21. modify-dynamic-servers".
[DAS]domain1.adminServer>modify-dynamic-servers cluster1 -count 3 -nodes node1 -template temp1
Successfully performed the MODIFY operation for Dynamic servers configuration in the cluster (cluster1),
but some changes were non-dynamic. They will be applied after restarting.
Check the results using "modify-dynamic-servers or show-dynamic-servers".
Use the show-dynamic-servers command to verify that the dynamic servers have been added.
[DAS]domain1.adminServer>show-dynamic-servers cluster1
Shows the current configuration.
Dynamic servers configuration in the cluster (cluster1)
====================================================================
+----------------------------------------------------------+-------+
| Server Count | 3 |
| Nodes | node1 |
| Base Listen Port | 9736 |
| HTTP Listen Port | 8088 |
| JMS Listen Port | 9741 |
| Server Template Name | temp1 |
| Listen Port Step | 100 |
+----------------------------------------------------------+-------+
====================================================================
Servers in a cluster can be removed to reduce the size of a cluster. Shut down the server to remove a server from the cluster. Check to make sure that all running services are complete, and then remove the server from the cluster. This section describes how to remove a server from the cluster using WebAdmin and jeusadmin.
The following are the steps for removing a server from the cluster in WebAdmin.
Click [Servers] from the left menu to go to the list of servers. Click [Stop] to shut down the server to remove.
Click [Lock & Edit] to change to the configuration mode. Refer to JEUS WebAdmin Guide. "2.3.2. Menu" for detailed information about the configuration mode in WebAdmin.
Click [Clusters] to go to the list of clusters. Click the cluster that contains the server to remove.
The method for adding servers to a cluster depends on the manner a cluster is configured.
When a cluster is configured by selecting servers
The following are the steps for removing servers from a cluster. Users can remove a server from a cluster by deselecting it on the server list.
To change the cluster settings, click [Clusters] to go to the cluster list screen.
Deselect a server from 'Servers' and then click [OK].
Delete the server removed from the cluster unless users want to use it as an independent server. Click [Servers] to see the server list and then click [Delete].
When a cluster is configured using the dynamic server setting
The following are the steps for removing a server form a cluster configured with dynamic servers. Users can remove a server by changing the cluster settings.
To change the cluster settings, click [Clusters] to go to the cluster screen.
In the 'Server Count' field under 'Dynamic Servers', enter a number smaller than the current one and then click [OK]. The number of servers is decreased by the difference between the updated server count and the previous one.
Verify that the server has been removed, and then click [Apply Changes] to apply the changes.
A message is displayed that the server has been removed from the cluster and deleted.
The following are the steps for removing a server from the cluster using jeusadmin, a console tool. As above, the method of removing a server depends on whether a cluster is created by adding servers or not.
When a cluster is configured by selecting servers
The following are the steps for removing a server from a cluster when it has been configured by selecting servers.
Shut down server2 by using the stop-server command. Refer to JEUS Reference Book. "4.2.3.50. stop-server" for detailed information about the stop-server command.
[DAS]domain1.adminServer>stop-server server2
Server [server2] was successfully stopped.
Remove server2 from cluster1 by using the remove-servers-from-cluster command. Refer to JEUS Reference Book. "4.2.4.29. remove-servers-from-cluster" for detailed information about the remove-servers-from-cluster command.
[DAS]domain1.adminServer>remove-servers-from-cluster cluster1 -servers server2
Successfully performed the REMOVE operation for The server list for cluster(cluster1)..
Check the results using "list-clusters cluster1 or remove-servers-from-cluster cluster1"
Remove server2 by using the remove-server command if it is not to be used as an independent server. Refer to JEUS Reference Book. "4.2.4.28. remove-server" for detailed information about the remove-server command.
[DAS]domain1.adminServer>remove-server server2
Successfully performed the REMOVE operation for server (server2).
Check the results using "list-servers or remove-server"
When a cluster is configured using the dynamic server setting
The following are the steps for removing a server from a cluster when it has been configured using the dynamic server setting.
Use the modify-dynamic-servers command to remove dynamic servers from cluster1. The number of servers is decreased to the configured number by removing the servers. Refer to JEUS Reference Book. "4.2.4.21. modify-dynamic-servers" for more information about the modify-dynamic-servers command.
[DAS]domain1.adminServer>modify-dynamic-servers cluster1 -count 1 -nodes node1 -template temp1
Successfully performed the MODIFY operatTo dion for Dynamic servers configuration in the cluster (cluster1),
but some changes were non-dynamic. They will be applied after restarting.
Check the results using "modify-dynamic-servers or show-dynamic-servers".
Use the show-dynamic-servers command to verify that the dynamic servers have been removed.
[DAS]domain1.adminServer>show-dynamic-servers cluster1
Shows the current configuration.
Dynamic servers configuration in the cluster (cluster1)
====================================================================
+----------------------------------------------------------+-------+
| Server Count | 1 |
| Nodes | node1 |
| Base Listen Port | 9736 |
| HTTP Listen Port | 8088 |
| JMS Listen Port | 9741 |
| Server Template Name | temp1 |
| Listen Port Step | 100 |
+----------------------------------------------------------+-------+
====================================================================
A cluster can be removed when a service does not need to run. Remove the cluster after shutting it down and then verifying that all the services have completed. This section describes how to remove a cluster using WebAdmin and jeusadmin.
The following are the steps for removing a cluster in WebAdmin.
Click [Lock & Edit] to change to the configuration mode.
Refer to JEUS WebAdmin Guide. "JEUS WebAdmin manual" for detailed information about the configuration mode in WebAdmin.
Click [Clusters] from the left menu to go to the list of clusters. Click [Stop] to stop the cluster.
After stopping the cluster, click [Delete] to remove it.
To delete the servers removed from the cluster, click [Servers] to go to the server list screen and then click [Delete].
When a cluster configured with dynamic servers is deleted, they are deleted automatically.
Verify that the cluster has been removed, and then click [Apply Changes] to apply the changes.
A message is displayed that cluster1 and the servers belonging to it have been deleted.
The following are the steps for removing a cluster using jeusadmin, a console tool.
Shut down the cluster using the stop-cluster command. In this example, cluster1, which consists of server1 and server2 will be deleted. Refer to JEUS Reference Book. "4.2.3.48. stop-cluster" for detailed information about the stop-cluster command.
[DAS]domain1.adminServer>stop-cluster cluster1
The cluster [cluster1] was successfully stopped.
Run the serverinfo command to verify that the state of server1 and server2, which are in cluster1, is SHUTDOWN.
[DAS]domain1.adminServer>serverinfo
Information about Domain (domain1)
==============================================================================================
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
| Server | Status | Node| PID | Clus| Latest Start | Need to| Listen Ports| Running |
| | |Name | | ter |Time / Shutdown |Restart | | Engines |
| | | | | | Time | | | |
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
| adminSe| RUNNING | N/A | 5360 | N/A | 2016-08-23 | false | base-192.168| jms, |
|rver(*) |(00:09:48| | | |(Tue) PM | |.34.3:9736 | ejb, web |
| |) | | | |03:53:28 KST | | http-server-| |
| | | | | | | |0.0.0.0:8088 | |
| | | | | | | |jms-internal-| |
| | | | | | | |0.0.0.0:9741 | |
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
| server1| SHUTDOWN|node1| N/A | clus| 2016-08-23 | N/A | N/A | N/A |
| |(00:00:11| | |ter1 |(Tue) PM | | | |
| |) | | | |04:03:05 KST | | | |
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
| server2| SHUTDOWN|node2| N/A | clus| 2016-08-23 | N/A | N/A | N/A |
| |(00:00:11| | |ter1 |(Tue) PM | | | |
| |) | | | |04:03:05 KST | | | |
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
==============================================================================================
Remove the cluster by using the remove-cluster command. Refer to JEUS Reference Book. "4.2.4.22. remove-cluster" for detailed information about the remove-cluster command.
[DAS]domain1.adminServer>remove-cluster cluster1
Successfully performed the REMOVE operation for cluster (cluster1).
Check the results using "list-clusters or remove-cluster"
After the cluster has been removed, the servers need to be processed differently according to the situation.
Servers that were created dynamically are deleted once the cluster is deleted.
Delete the servers that belonged to the removed cluster unless they are to be used as independent servers. Remove server1 and server2 using the remove-server command. Refer to JEUS Reference Book. "4.2.4.28. remove-server" for detailed information about the remove-server command.
[DAS]domain1.adminServer>remove-server server1 Successfully performed the REMOVE operation for server (server1). Check the results using "list-servers or remove-server" [DAS]domain1.adminServer>remove-server server2 Successfully performed the REMOVE operation for server (server2). Check the results using "list-servers or remove-server"