Specifying replication between selected nodes only
What is static replication domaining? Static replication domaining means partitioning Rhino's replication mechanisms to perform replication only between selected subsets of nodes. This provides better scaling for larger clusters, while still providing a level of replication to ensure fault tolerance.
A domaining configuration consists of a set of domain definitions, each associated with one or more domainable resources and one or more cluster nodes.
It is extremely important that the domaining configuration section of rhino-config.xml is identical between all cluster nodes and does not change for the lifetime of the cluster. Any changes to the domaining configuration must be made while the cluster is offline.
Some persistence resources are not domainable as they contain data which either makes no sense to domain, or which must be global to the entire cluster. The current undomainable persistence resources are ReplicatedMemoryDatabase, LocalMemoryDatabase, and ManagementDatabase.
rhino-config.xml includes the following sample domaining configuration, commented out by default. It configures an 8-node cluster into 4 domains, with each domain containing 2 nodes — specifying that replication of SBB and RA shared state only happens between each pair of nodes.
Example replication domain configuration.
This example splits the cluster into several 2-node domain pairs for the purposes of
service state replication. This example does not cover replication domaining for writeable
<domain name="domain-1" nodes="101,102">
<domain name="domain-2" nodes="201,202">
<domain name="domain-3" nodes="301,302">
<domain name="domain-4" nodes="401,402">
This example contains node IDs which start with the same number as their corresponding domain. While it's not required, OpenCloud recommends this naming scheme as it clarifies which nodes are associated with a particular domain.
The default domain (named domain-0) is not configurable and contains all replicated resources which are not explicitly domained as part of the configuration in rhino-config.xml. If a node is booted into the cluster, and does not have an associated domain configuration associated with it, it will use the default domain for all persistence resources. If no domains are configured at all, all resources will belong to the default domain.
It is possible, though less usual, to configure overlapping domains with different resources. The only constraint on the domaining configuration is that for each domainable resource, it may only occur in a single domain for any given node. For example, the following configuration is valid, despite multiple nodes containing the same NodeIDs.
This example builds on the basic example, adding two more domains (domain-profiles-1 and domain-profiles-2). These additional domains allow replication of writeable profiles (backed by MyWriteableProfileDatabase) across a larger set of nodes than the domains used for service replication.