GlassFish Server Open Source Edition - Configuring dynamic clustering in User-Managed Cluster(UMC) In Glassfish 3.1, UDP multicast is required for dynamic discovery of GlassFish cluster by dynamic clustering implementation, Shoal GMS. To support dynamic discovery of GlassFish cluster without using UDP multicast, a static list of some members of the cluster, commonly referred to as a Well Known Address(WKA) list. At least one of the IP addresses in this WKA list must be running for other instances to be able to join the GlassFish cluster. The IP addresses in this list typically belong to server class machines with static IP addresses and DNS entries. However, in a dynamic environment (such as a Cloud) where there is no udp multicast, no static IP addresses and virtual machines with DHCP addresses are being generated, we would like to refer to the list as a SEED LIST to assist in finding at least one running member of the Group. For that very reason, the dynamic clustering impl is requesting that when starting every glassfish server in this dynamic environment, it is provided a snapshot of the running instances that are already in the cluster. This seed list provides the ability to find at least one member of the Glassfish cluster, and allows the new Glassfish instance to join the cluster through an initial communication to a member of the SEED list. All dynamic clustering is maintained by GMS after the an instance intially joins through the SEED LIST. Since the list of potential instances in the cluster is constantly changing, the latest snapshot provides the most accurate information. This list need not be complete list of running instances. It could be just any running instance that is a member of the GMS group. However, for robustness sake, it would be good if it was more than one instance. For user managed cluster, the following commands are needed to configure and start the clustered glassfish instance. (below assumes that GMS properties have been moved from cluster object that will not exist in user-managed cluster to group-management-service property)
// following lines extracted from http://wikis.sun.com/display/GlassFish/GlassFish+User-Managed+Clusters+Design
// to ease in following overall logic.
asadmin create-domain domain1
asadmin start-domain
asadmin set servers.server.server.property.cluster-member-name=domain1-instance1
asadmin set servers.server.server.property.cluster-name=domain1-cluster
// end of extraction from User Managed Clusters Design
// GMS configuration commands
// configuring GMS DISCOVERY
set RUNNING_INSTANCES `get current list of running IP addresses for glassfish cluster`
asadmin set configs.config.server-config.group-management-service.property.GMS_DISCOVERY_URI_LIST=$RUNNING_INSTANCES
// TBD. Other GMS configuration.
// Note: abandoned design that setting this property would be dynamic.
// Other subsystems that rely on GMS dynamic clustering services only register dynamic cluster event handlers when
// GMS is enabled. Thus, gms must be enabled all through start up. Based on this reliance, setting GMS_ENABLED from
// false to true is considered an event requiring restart of the server in UMC environment.
asadmin set configs.config.server-config.group-management-service.property.GMS_ENABLED="true"
asadmin restart-domain
The RUNNING_INSTANCES list can be retrieved in many different ways. Various methods are still being evaluated. |