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.
The following configuration defines a multi-zone data source with delegate data sources for two zones.
<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 .