|Deploying a GemFire XD Distributed System / Configuring Multi-site (WAN) Deployments|
A multi-site installation consists of two or more distributed systems. Each site is its own distributed system and has one or more logical connections to other sites, called gateways.
Basic WAN replication configuration
More complex multi-site configurations can add additional GemFire XD clusters to the basic configuration shown above. As additional clusters are added, each individual cluster in the deployment requires an additional gateway sender to ensure that each site replicates to all other sites across the WAN. (See Multi-site Topologies)
WAN configuration with multiple gateway senders
The logical connections between distinct GemFire XD clusters are known as gateways. Gateways are configured in one or more GemFire XD data store members and consist of two physical connections: a gateway sender and a gateway receiver.
A gateway receiver provides a physical connection for receiving DML operations from one or more remote GemFire XD clusters for replicating those operations in the local cluster. Each GemFire XD cluster needs only a single named gateway receiver to replicate data from all other remote sites. Remote gateway senders use any available gateway receiver to send DML operations. However, you can deploy a gateway receiver to multiple GemFire XD members for high availability.
A gateway sender runs on a GemFire XD data store members, and it replicates configured table DML operations to another GemFire XD distributed system. Each sender is usually hosted by more than one data store member, with one member hosting the primary gateway sender instance and the others hosting backup instances. The primary is the only instance that communicates with remote sites at a given time. Gateway senders are identified within the distributed system by a unique identifier.
Notice that each gateway sender only specifies the remote distributed system ID to use for replicating DML operations. The actual connection information (the host and port number of a gateway receiver in the remote distribute system) are obtained dynamically from the cluster locators. Locators automatically update this information as gateway receivers in remote sites change or go offline.
GemFire XD designates the first gateway sender to start up as the primary sender, and all other senders become secondaries. As gateway senders are started and shut-down in the distributed system, GemFire XD ensures that the oldest running gateway sender operates as the primary.