Global Caching with Multi-Region Deployments

When using Global Caching, a Distributed Cache in one region is designated as the Home Distributed Cache to indicate that it contains the definitive version of the cached data. Distributed Cache Clusters in other regions are then configured with Global Topics, which they fetch on demand from the Home Cache Clusters. For more information, refer to Using Global Caching.

The figure below shows a typical deployment model for Global Caching. Multiple-Node Routing neighbor links between the regions are assigned appropriate costs to ensure that published messages never cross the WAN link between regions more than once (in much the same way as within a region, neighbor link costs ensure that messages never cross the WAN between the primary and backup data center more than once).

Global Caching Across Two Regions

Configuration Summary

The configuration of Global Caching within each region is similar to the configuration of a single-region caching solution, with the following additional considerations:

  • All Distributed Cache, Cache Cluster, and PubSub+ Cache Instance names in the network must be globally unique.
  • The Cache Clusters in the remote regions typically will not be configured with any local topics. Instead, they will only be configured with Global Topics which are fetched on-demand from the Home Cache Clusters.

Expanding PubSub+ Cache Beyond Two Regions

The previous section illustrated the interconnection of two regions. This configuration model can easily be expanded to accommodate multiple regions, as shown below.

Connectivity Across Four Regions

In this example, Region 4 is a smaller region connected by expensive, low‑bandwidth WAN links, so the Multiple-Node Routing neighbor links to Region 4 are costed much higher than the links between the other regions. This ensures that messaging traffic between two regions will never transit through Region 4 unless there are no other paths available in the network.

Also, in this example, when messages flow between Region 1 and 4 they must transit the routers in either Region 2 or Region 3. Depending upon the underlying WAN connectivity model, this may or may not be desirable. It is possible to avoid transiting the routers in Region 2 or 3 by configuring a set of high-costed neighbor links between Region 1 and 4 so that there is full-mesh connectivity between the regions.

It is also possible to cascade the Distributed Caches in this topology so that, for example, the Home Cache for Region 4 could be the Distributed Cache in Region 2; and the Home Cache for Region 2 could be the Distributed Cache in Region 1. In such a topology, if a Cache Instance in Region 4 receives a cache request for a topic that it has not yet cached, it would ask the Home Cache in Region 2 for the data. If the Cache Instance in Region 2 also does not have the topic cached yet, it would ask the Home Cache in Region 1 for the data.