Multi-zone

The multi-zone data source is an aggregator that delegates to different backing data sources based on the zone of the current service role. This makes configuration simpler in multi-region deployment scenarios.

The set of supported operations depends on the operations supported by the delegate data sources. For example, a multi-zone data source can only be used to store tokens if all the delegate data sources support storing tokens.

Configuration

The configuration of which data source to use for each zone is defined by a zone-mapping. It is also possible to define which data source is used by default when the current zone doesn’t match any of the configured zones.

Tip

The full configuration reference is found in the configuration section

The following configuration defines a multi-zone data source with delegate data sources for two zones.

Listing 59 Multi-region data source configuration example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
      <data-source>
          <id>MultiZoneDataSource</id>
          <multi-zone xmlns="https://curity.se/ns/conf/data-access/multi-zone">
              <zone-mapping>
                  <zone>zone-1</zone>
                  <data-source>DataSource1</data-source>
              </zone-mapping>
              <zone-mapping>
                  <zone>zone-2</zone>
                  <data-source>DataSource2</data-source>
              </zone-mapping>
          </multi-zone>
      </data-source>

Note that the referenced zones also need to be defined in configuration.