Overview
This section describes GigaSpaces clustering capabilities. It explains the built-in clustering topologies GigaSpaces support and how to use these; clustering concepts and their GigaSpaces implementation; discusses how to configure a cluster and maintain it; and provides a step-by-step guide detailing how to build a common cluster configuration.
For details on how a network of processors elects a unique processor (a leader), and how to avoid split-brain scenarios, refer to the Active Election and Avoiding Split-Brain Scenarios section.
The status of clustered spaces can be viewed using different logging levels. For more details, refer to the Viewing Clustered Space Status section.
Cluster Schema Options
The cluster XML schema configuration file includes tags that define the replication, load-balancing, and failover parameters and policies.
Each cluster has an XML schema configuration file that defines:
- The cluster name, which is unique in the environment. Clients can connect the cluster via its name regardless the actual machines running the cluster spaces.
- Space members and their location – each space member is identified as a 'container:space' pair, for example container1:space1. Spaces can be defined in the configuration file even if they don't exist yet.
- Groups and policies – space members should be grouped; a cluster can include several groups; groups have policies that determine whether clustered spaces perform replication, failover, or load-balancing between them.
Managing Clusters
It can be difficult to understand the structure and settings of a cluster from its configuration file. The GigaSpaces Management Center Space Browser offers a graphic representation of cluster groups, the spaces within them, and the relationships between spaces. The cluster viewer also shows persistency, load balancing and failover settings for any space you click on.
The Cluster view allows you to manipulate cluster members easily.
Read more...
Right click the Cluster icon in the right tree side of the main window. This displays the following options:
- Start Cluster – this starts a stopped cluster. All cluster members are restarted. If some of the cluster members fail to start, you get an appropriate indication.
- Stop Cluster – this stops all cluster members. If some of the cluster members fail to stop, you get an appropriate indication.
- Restart Cluster – this stops and starts all cluster members. If some of the cluster members fail to start, you get an appropriate indication.
- Clean Cluster – this deletes all Entries and their class definitions from all cluster members.
To learn how to use the Cluster view, see Cluster View.
Replication Filters
When constructing a replicated space topology you might need to call some business logic when data is replicated. This can be done using the IReplicationFilter plug-in interface. IReplicationFilter methods are called before data is sent to the replication channel from the source space (output mode) and after coming out from the replication channel – i.e. before they are written to the target space (input mode). The replication filter should implement the com.j_spaces.core.cluster.IReplicationFilter interface methods.
Read more...
The replication filter can be used to monitor or alter the data passed through the replication channel. The replication channel passes replication filter Entry objects that store the replicated data.
The cluster schema should include the class name for input and output mode that implements the IReplicationFilter, and some free text parameter passed into the replication filter. You can use the same replication filter implementation class for both input and output replication modes.
For more details, refer to the Replication Filters section.
Creating Static Cluster
You can create a cluster from scratch using the Cluster Wizard in the GigaSpaces Management Center. The sections on the right (under Creating Static Cluster) show the overall workflow, and provide step-by-step procedures on how to create the cluster.
An example of a cluster using static cluster configuration can be found in the
<GigaSpaces Root>\examples\Advanced\Data_Grid\multi-site folder.
|
Section Contents
|