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. Domain Composition" 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. "2.2. Basic Concepts" for detailed information about distributed session servers and JEUS Session Management Guide. "2.8. Session Server Configuration" 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.
The number of servers in a cluster can be adjusted by adding or deleting servers based on the load.
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.
This section describes how to add a server to the cluster.
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.
Click [Add] from the Servers screen to go to the [Basic] > [Basic Info] menu. Configure the server to add and click [OK].
After adding the server, add it to a cluster. Click [Clusters] to go to the list of clusters. Click a cluster to add the server to.
Select the newly created server and then click [OK] from the Cluster screen.
A message is displayed that a server has been added to the cluster. Click [Apply Changes] to apply the changes.
A message is displayed that a server has 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.
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
9836
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(cluster
1)..
Check the results using "list-clusters cluster1 or add-servers-to-cluster cluste
r1"
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 | Fri Mar 22 | false | base-192.168| jms, |
|rver(*) |(82 sec) | | | |10:41:25 KST | |.34.3:9736 | ejb, web |
| | | | | |2013 | | http-server-| |
| | | | | | | |0.0.0.0:8088 | |
| | | | | | | |jms-internal-| |
| | | | | | | |0.0.0.0:9741 | |
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
| server1| RUNNING |node1| 6424 | clus| Fri Mar 22 | false | base-192.168| jms, |
| |(30 sec) | | |ter1 |10:42:17 KST | |.34.1:9836 | ejb, web |
| | | | | |2013 | | | |
--------+---------+-----+-------+-----+-----------------+--------+-------------+-------------+
| server2| RUNNING |node2| 3012 | clus| Fri Mar 22 | false | base-192.168| jms, |
| |(1 sec) | | |ter1 |10:42:39 KST | |.34.2:9936 | ejb, web |
| | | | | |2013 | | | |
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
==============================================================================================
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.
Clear the server from the Cluster screen, and then click [OK].
If the server will not be used as an independent server, delete it. Click [Servers] from the left menu and click [Delete].
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.
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.27. 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 used as an independent server. Refer to JEUS Reference Book. "4.2.4.26. 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"
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.
Delete the servers that belong to the removed cluster if they will not be used as independent servers.
Click [Servers] from the left menu to go to the list of servers. Click [Delete] next to each server that was in the removed cluster.
A message is displayed that the server has been deleted. Click [Apply Changes] to apply the changes.
A message is displayed that cluster1 and the servers that were in the cluster have been removed.
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 | Fri Mar 22 | false | base-192.168| jms, |
|rver(*) |(92 sec) | | | |10:41:25 KST | |.34.3:9736 | ejb, web |
| | | | | |2013 | | http-server-| |
| | | | | | | |0.0.0.0:8088 | |
| | | | | | | |jms-internal-| |
| | | | | | | |0.0.0.0:9741 | |
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
| server1| SHUTDOWN| N/A | N/A | N/A | Fri Mar 22 | N/A | N/A | N/A |
| |(8 sec) | | | |10:42:17 KST | | | |
| | | | | |2013 | | | |
--------+---------+-----+-------+-----+----------------+--------+--------------+-------------+
| server2| SHUTDOWN| N/A | N/A | N/A | Fri Mar 22 | N/A | N/A | N/A |
| |(8 sec) | | | |10:42:39 KST | | | |
| | | | | |2013 | | | |
+--------+---------+-----+-------+-----+----------------+--------+-------------+-------------+
==============================================================================================
Remove the cluster by using the remove-cluster command. Refer to JEUS Reference Book. "4.2.4.20. 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"
Remove the servers of the removed cluster if they will not be used as independent servers. Remove server1 and server2 using the remove-server command.
Refer to JEUS Reference Book. "4.2.4.26. 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"