Configuring multiple data center topologies
With the multi-master asynchronous replication, you link a set of catalog service domains. The connected catalog service domains are then synchronized using replication over the links. You can define the links using properties files, at run time with Java Management Extensions (JMX) programs, or with command-line utilities. The set of current links for a domain is stored in the catalog service. You can add and remove links without restarting the catalog service domain that hosts the data grid.
Before you begin
- See Planning multiple data center topologies for more information about multi-master replication topologies and design considerations. You can configure links among catalog service domains with the server properties file to form the topology during server startup. You can also configure links at run time.
- If you are using loaders in your multi-master replication topology, you must plan how you are going to maintain accurate data between the data centers. The approaches that you can use vary depending on the topology you are using. For more information, see Loader considerations in a multi-master topology.
When you use multimaster replication (MMR) with eviction enabled or are using the ObjectMap.invalidate() method, the operations on those keys are not flowed to foreign domains. When foreign domain operations do not receive those keys, an entry might be invalidated in one domain, but the entry in the other domain is still there because it has not expired yet. This behavior causes map size output for the two domains to be different. When a domain is restarted and it receives the data from the other domain, the eviction data for that domain is different from the other, since all entries in the restarted domain now have a new access time.
Procedure
Examples
domainName=A
foreignDomains=B
B.endPoints=hostB1:2809, hostB2:2809
domainName=B
foreignDomains=A
A.endPoints=hostA1:2809,hostA2:2809
- Has a private catalog service with a unique domain name
- Has the same data grid name as other grids in the domain
- Has the same number of partitions as other data grids in the domain
- Has a data grid that uses the fixed partition placement strategy. A data grid that is configured to use a per container placement strategy cannot be replicated.
- Has the same number of partitions (it might or might not have the same number and types of replicas)
- Has the same data types being replicated as other data grids in the domain
- Has the same map set name, map names, and dynamic map templates as other data grids in the domain
The preceding example shows how to configure each domain to have a link to the other domain, but it is necessary only to define a link in one direction. This fact is especially useful in hub and spoke topologies, allowing a much simpler configuration. The hub property file does not require updates as spokes are added, and each spoke file needs only to include hub information. Similarly, a ring topology requires each domain to have only a link to the previous and next domain in the ring.
domainName=Hub
domainName=A
foreignDomains=Hub
Hub.endPoints=hostH1:2809, hostH2:2809
domainName=B
foreignDomains=Hub
Hub.endPoints=hostH1:2809, hostH2:2809
domainName=C
foreignDomains=Hub
Hub.endPoints=hostH1:2809, hostH2:2809
domainName=D
foreignDomains=Hub
Hub.endPoints=hostH1:2809, hostH2:2809
What to do next
- If you need to check or troubleshoot problems with the links between your catalog service domains, you can use the xscmd utility. For more information about commands to help you troubleshoot your multiple data center configuration, see Troubleshooting multiple data center configurations.
- You can provide a custom collision arbiter to resolve collisions between the catalog service domains. See Developing custom arbiters for multi-master replication for more information.