Multi-region deployment gateways#
Reliability · API Management · Rule · 2022_12 · Important
API Management instances should have multi-region deployment gateways enabled.
Description#
Azure API Management supports multi-region deployment. Deploy API Management in multiple locations to:
- Provide active-active redundancy for API gateway requests across Azure regions.
- Serve the request from the closest API gateway region to the original request.
API gateways can be disabled to enabled you to test failover of your API workloads to another region. When disabled, an API gateway will not route API traffic. You should reenable API gateways after you have concluded failover testing to ensure that the API gateway is available for failover if another region becomes unavailable.
If a region goes offline, API requests are automatically routed around the failed region to the next closest gateway.
Recommendation#
Consider enabling each regional API gateway location for multi-region redundancy.
Examples#
Configure with Azure template#
To deploy API Management instances that pass this rule:
- Set the
properties.additionalLocations.disableGateway
property tofalse
for each additional location.
For example:
{
"type": "Microsoft.ApiManagement/service",
"apiVersion": "2021-12-01-preview",
"name": "[parameters('apiManagementServiceName')]",
"location": "eastus",
"sku": {
"name": "Premium",
"capacity": 1
},
"properties": {
"additionalLocations": [
{
"location": "westeurope",
"sku": {
"name": "Premium",
"capacity": 1
},
"disableGateway": false
}
]
}
}
Configure with Bicep#
To deploy API Management instances that pass this rule:
- Set the
properties.additionalLocations.disableGateway
property tofalse
for each additional location.
For example:
resource apiManagementService 'Microsoft.ApiManagement/service@2021-12-01-preview' = {
name: apiManagementServiceName
location: 'eastus'
sku: {
name: 'Premium'
capacity: 1
}
properties: {
additionalLocations: [
{
location: 'westeurope'
sku: {
name: 'Premium'
capacity: 1
}
disableGateway: false
}
]
}
}
Configure with Azure Verified Modules
A pre-validated module supported by Microsoft is available from the Azure Bicep public registry. To reference the module, please use the following syntax:
To use the latest version: