-
Language:
English
-
Language:
English
Chapter 36. High Availability Using Server Hinting
36.1. Server Hinting
Server Hinting helps you achieve high availability with your Red Hat JBoss Data Grid deployment.
To use Server Hinting, you provide information about the physical topology with attributes that identify servers, racks, or data centers to achieve more resilience with your data in the event that all the nodes in a given physical location become unavailable.
When you configure Server Hinting, JBoss Data Grid uses the location information you provided to distribute data across the cluster so that backup copies of data are stored on as many servers, racks, and data centers as possible.
In some cases JBoss Data Grid stores copies of data on nodes that share the same physical location. For example, if the number of owners for segments is greater than the number of distinct sites, then JBoss Data Grid assigns more than one owner for a given segment in the same site.
Server Hinting does not apply to total replication, which requires complete copies of data on every node.
Consistent Hashing controls how data is distributed across nodes. JBoss Data Grid uses TopologyAwareSyncConsistentHashFactory
if you enable Server Hinting. For policy configuration details, see ConsistentHashFactories in the Developer Guide.
36.2. Establishing Server Hinting with JGroups
When setting up a clustered environment in Red Hat JBoss Data Grid, Server Hinting is configured when establishing JGroups configuration.
JBoss Data Grid ships with several JGroups files pre-configured for clustered mode. These files can be used as a starting point when configuring Server Hinting in JBoss Data Grid.
See Also: Pre-Configured JGroups Files
36.3. Configuring Server Hinting
You configure Server Hinting with the following attributes:
-
cluster
identifies the cluster where the node runs. Note that nodes with different cluster names are not visible to each other. As a result, multiple clusters can use the same multicast address if the cluster names are different. -
machine
identifies the physical host where the node runs. -
rack
identifies the rack that contains the physical host where the node runs. -
site
identifies the data center where the node runs. -
node-name
is the name of the JBoss Data Grid instance, or node. Having unique names for each node helps identify them for diagnostics, but is not required. In Remote Client-Server mode, the default value is a combination of the host name and a random number. In Library mode, the default value is the host name appended with a random number, which is added even when the node name is set in the configuration.
In Remote Client-Server mode, you configure Server Hinting in the JGroups subsystem on the transport
element for the default stack, as in the following example:
<subsystem xmlns="urn:jboss:domain:jgroups:3.0" default-stack="${jboss.default.jgroups.stack:udp}"> <stack name="udp"> <transport type="UDP" socket-binding="jgroups-udp" site="${jboss.jgroups.transport.site:s1}" rack="${jboss.jgroups.transport.rack:r1}" machine="${jboss.jgroups.transport.machine:m1}"> <!-- Additional configuration elements here --> </transport> </stack> </subsystem>
In Library mode, you configure Server Hinting at the transport level, as in the following example:
<transport cluster = "MyCluster" machine = "LinuxServer01" rack = "Rack01" site = "US-WestCoast" node-name = "Node01" />