Multi-site (WAN) Topologies

To configure your multi-site topology, you should understand the recommended topologies and the topologies to avoid.

This section describes GemFire’s support for various topologies. Depending on your application needs, there may be several topologies that work. These are considerations to keep in mind:
  • When a GemFire site receives a message, it forwards it to the other sites it knows about, excluding sites it knows have already seen the message. The message contains the initial sender's ID and the ID of each of the sites the initial sender sent to, so no site forwards to those sites. The messages do not pick up the ID of the sites they pass through, however, so it is possible in certain topologies for more than one copy of a message to be sent to one site.
  • In some configurations, the loss of one site affects how other sites communicate with one another.

Parallel Multi-site Topology

A parallel network is one where all sites know about each other. This is a robust configuration, where one of the sites can go down without disrupting communication between the other sites. This configuration also guarantees that no site receives multiple copies of the same message.

The parallel topology for three sites is shown in this figure. In this scenario, if site 1 sends an update to site 2, site 2 forwards to site 3. If site 1 sends an update to sites 2 and 3, neither forwards to the other. Likewise for any other initiating site. If any site is removed, the other two maintain a parallel topology.



Serial Multi-site Topology

A serial network is one where each site only knows about one other site. Data is passed from one site to the next serially. This figure shows the topology for three sites. In this scenario, if site 1 sends updates to site 2, site 2 forwards to site 3. Site 3 does not send the updates back to site 1.

This topology guarantees that every site receives one copy of each message sent by any site. With a serial installation, every site must stay up to maintain the topology. The failure of any site breaks the serial link. If site 2 went down, for example, site 3 could send to site 1, but site 1 could not send to site 3.



Hybrid Multi-site Topology

A hybrid network contains both parallel and serial connections. There are numerous such configurations.

The following figure shows a hybrid topology composed of a serial topology with an additional link directly from site 1 to site 3, creating a parallel topology between sites 1 and 3. With this topology, no site can receive the same update twice.

With this hybrid topology, if site 2 went down, it would not affect communication between sites 1 and 3 as both could still send to the other. If site 3 went down, however, site 2 would not be able to send to site 1.



In the figure below, sites 2 and 3 are isolated from one another. This topology might work for a situation where there is one producer (site 1) and multiple consumers that have nothing to gain from being connected. This topology also guarantees that no site receives the same update twice.



Topologies to Avoid

This section lists topologies that do not work and are unsupported.

In the topology shown in the next figure, some sites might receive multiple copies of the same message. Assume, for example, that site 1 sends a message to site 2. Site 2 forwards the message to both sites 3 and 4. Site 4 will also send the message to site 3 as it does not know that site 3 has already been sent the message. Site 3 will receive the message twice. Additionally, sites 3 and 4 are dependent on site 2 for updates from site 1.



In this next unsupported configuration, if site 1 sends a message to site 2, site 2 forwards to site 3 and site 3 forwards to site 4. Site 4 does not know that site 3 has already been sent the message (the message only reports the original sender and receivers, in this case, site 1 and site 2, respectively). Site 4 also sends the message to site 3, and site 3 receives the message twice.



In this next unsupported configuration, if site 1 sends a message to sites 2 and 3, sites 2 and 3 will both forward to site 4.