Migrate Azure API Management to availability zone support

This guide describes how to enable availability zone support for your API Management instance. The API Management service supports Zone redundancy, which provides resiliency and high availability to a service instance in a specific Azure region. With zone redundancy, the gateway and the control plane of your API Management instance (Management API, developer portal, Git configuration) are replicated across datacenters in physically separated zones, making it resilient to a zone failure.

In this article, we'll take you through the different options for availability zone migration. For background about configuring API Management for high availability, see Ensure API Management availability and reliability.

Prerequisites

Downtime requirements

There are no downtime requirements for any of the migration options.

Considerations

  • Changes can take from 15 to 45 minutes to apply. The API Management gateway can continue to handle API requests during this time.

  • When migrating an API Management deployed in an external or internal virtual network to availability zones, a new public IP address resource must be specified. In an internal VNet, the public IP address is used only for management operations, not for API requests. Learn more about IP addresses of API Management.

  • Migrating to availability zones or changing the availability zone configuration will trigger a public IP address change.

  • When enabling availability zones in a region, you configure a number of API Management scale units that can be distributed evenly across the zones. For example, if you configure 2 zones, you could configure 2 units, 4 units, or another multiple of 2 units. Adding units incurs additional costs. For details, see API Management pricing.

  • If you've configured autoscaling for your API Management instance in the primary location, you might need to adjust your autoscale settings after enabling zone redundancy. The number of API Management units in autoscale rules and limits must be a multiple of the number of zones.

Option 1: Migrate existing location of API Management instance, not injected in VNet

Use this option to migrate an existing location of your API Management instance to availability zones when it’s not injected (deployed) in a virtual network.

  1. In the Azure portal, navigate to your API Management service.

  2. Select Locations in the menu, and then select the location to be migrated. The location must support availability zones.

  3. Select the number of scale Units desired in the location.

  4. In Availability zones, select one or more zones. The number of units selected must be distributed evenly across the availability zones. For example, if you selected 3 units, select 3 zones so that each zone hosts one unit.

  5. Select Apply, and then select Save.

    Screenshot of how to migrate existing location of API Management instance not injected in VNet.

Option 2: Migrate existing location of API Management instance (stv1 platform), injected in VNet

Use this option to migrate an existing location of your API Management instance to availability zones when it is currently injected (deployed) in a virtual network. The following steps are needed when the API Management instance is currently hosted on the stv1 platform. Migrating to availability zones will also migrate the instance to the stv2 platform.

  1. Create a new subnet and public IP address in location to migrate to availability zones. Detailed requirements are in virtual networking guidance.

  2. In the Azure portal, navigate to your API Management service.

  3. Select Locations in the menu, and then select the location to be migrated. The location must support availability zones.

  4. Select the number of scale Units desired in the location.

  5. In Availability zones, select one or more zones. The number of units selected must be distributed evenly across the availability zones. For example, if you selected 3 units, select 3 zones so that each zone hosts one unit.

  6. Select the new subnet and new public IP address in the location.

  7. Select Apply, and then select Save.

    Screenshot of how to migrate existing location of API Management instance injected in VNet.

Option 3: Migrate existing location of API Management instance (stv2 platform), injected in VNet

Use this option to migrate an existing location of your API Management instance to availability zones when it is currently injected (deployed) in a virtual network. The following steps are used when the API Management instance is already hosted on the stv2 platform.

  1. Create a new subnet and public IP address in location to migrate to availability zones. Detailed requirements are in virtual networking guidance.

  2. In the Azure portal, navigate to your API Management service.

  3. Select Locations in the menu, and then select the location to be migrated. The location must support availability zones.

  4. Select the number of scale Units desired in the location.

  5. In Availability zones, select one or more zones. The number of units selected must be distributed evenly across the availability zones. For example, if you selected 3 units, select 3 zones so that each zone hosts one unit.

  6. Select the new public IP address in the location.

  7. Select Apply, and then select Save.

    Screenshot of how to migrate existing location of API Management instance (stv2 platform) injected in VNet.

Option 4. Add new location for API Management instance (with or without VNet) with availability zones

Use this option to add a new location to your API Management instance and enable availability zones in that location.

If your API Management instance is deployed in a virtual network in the primary location, ensure that you set up a virtual network, subnet, and public IP address in any new location where you plan to enable zone redundancy.

  1. In the Azure portal, navigate to your API Management service.

  2. Select + Add in the top bar to add a new location. The location must support availability zones.

  3. Select the number of scale Units desired in the location.

  4. In Availability zones, select one or more zones. The number of units selected must be distributed evenly across the availability zones. For example, if you selected 3 units, select 3 zones so that each zone hosts one unit.

  5. If your API Management instance is deployed in a virtual network, select the virtual network, subnet, and public IP address that are available in the location.

  6. Select Add, and then select Save.

    Screenshot of how to add new location for API Management instance with or without VNet.

Next steps

Learn more about: