Ensure API Management availability and reliability
This article introduces service capabilities and considerations to ensure that your API Management instance continues to serve API requests if Azure outages occur.
API Management supports the following key service capabilities that are recommended for reliable and resilient Azure solutions. Use them individually, or together, to improve the availability of your API Management solution:
Availability zones, to provide resilience to datacenter-level outages
Multi-region deployment, to provide resilience to regional outages
API Management supports availability zones and multi-region deployment in the Premium service tier.
Azure availability zones are physically separate locations within an Azure region that are tolerant to datacenter-level failures. Each zone is composed of one or more datacenters equipped with independent power, cooling, and networking infrastructure. To ensure resiliency, a minimum of 3 separate availability zones are present in all availability zone-enabled regions.
Enabling zone redundancy for an API Management instance in a supported region provides redundancy for all service components: gateway, management plane, and developer portal. Azure automatically replicates all service components across the zones that you select. Zone redundancy is only available in the Premium service tier.
When you enable zone redundancy in a region, consider the number of API Management scale units that need to be distributed. Minimally, configure the same number of units as the number of availability zones, or a multiple so that the units are distributed evenly across the zones. For example, if you select 3 availability zones in a region, you could have 3 units so that each zone hosts one unit.
Use the capacity metric and your own testing to decide on the number of scale units that will provide the gateway performance for your needs. Learn more about scaling and upgrading your service instance.
With multi-region deployment, you can add regional API gateways to an existing API Management instance in one or more supported Azure regions. Multi-region deployment helps reduce request latency perceived by geographically distributed API consumers and improves service availability if one region goes offline. Multi-region deployment is only available in the Premium service tier.
With multi-region deployment, only the gateway component of your API Management instance is replicated to multiple regions. The instance's management plane and developer portal remain hosted only in the primary region, the region where you originally deployed the service.
If you want to configure a secondary location for your APIM, the VNET and subnet region should match with the secondary location you're configuring. If you're adding, removing, or enabling the Availability zone in the Primary region, or if you're changing the subnet of the primary region, then the VIP of APIM will change. For more information, see IP addresses of Azure API Management service. However, if you're adding a secondary region, the primary region's VIP of APIM won't change because every region has its own private VIP.
Gateway configurations such as APIs and policy definitions are regularly synchronized between the primary and secondary regions you add. Multi-region deployment provides availability of the API gateway in more than one region and provides service availability if one region goes offline.
When API Management receives public HTTP requests to the traffic manager endpoint (applies for the external VNet and non-networked modes of API Management), traffic is routed to a regional gateway based on lowest latency, which can reduce latency experienced by geographically distributed API consumers.
If a region goes offline, API requests are automatically routed around the failed region to the next closest gateway.
If the primary region goes offline, the API Management management plane and developer portal become unavailable, but secondary regions continue to serve API requests using the most recent gateway configuration.
Combine availability zones and multi-region deployment
The combination of availability zones for redundancy within a region, and multi-region deployments to improve the gateway availability if there's a regional outage, helps enhance both the reliability and performance of your API Management instance.
Use availability zones to improve the resilience of the primary region in a multi-region deployment
Distribute scale units across availability zones and regions to enhance regional gateway performance
API Management provides an SLA of 99.99% when you deploy at least one unit in two or more availability zones or regions. For more information, see Pricing.
While Azure continually strives for highest possible resiliency in SLA for the cloud platform, you must define your own target SLAs for other components of your solution.
Depending on where and how your backend services are hosted, you may need to set up redundant backends in different regions to meet your requirements for service availability. You can manage regional backends and handle failover through API Management to maintain availability. For example:
In multi-region deployments, use policies to route requests through regional gateways to regional backends.
Configure policies to route requests conditionally to different backends if there's backend failure in a particular region.
Use caching to reduce failing calls.
For details, see the blog post Back-end API redundancy with Azure API Manager.