แก้ไข

แชร์ผ่าน


Migrate Azure API Management to availability zones

The Azure 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, so they're resilient to a zone failure.

This article describes four options for migrating an API Management instance to availability zones. 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 15 to 45 minutes to apply. The API Management gateway can continue to handle API requests during this time.

  • When you're migrating an API Management instance that's deployed in an external or internal virtual network to availability zones, you must specify a new public IP address resource. In an internal virtual network, 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 configuration of availability zones triggers a public IP address change.

  • When you're enabling availability zones in a region, you configure API Management scale units that you can distribute evenly across the zones. For example, if you configure two zones, you can configure two units, four units, or another multiple of two units.

    Adding units incurs additional costs. For details, see API Management pricing.

  • If you 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.

Existing gateway location not injected in a virtual network

To migrate an existing location of your API Management instance to availability zones when the instance is not injected in a virtual network:

  1. In the Azure portal, go to your API Management instance.

  2. On the Deployment + infrastructure menu, select Locations.

  3. In the Location box, select the location to be migrated. The location must support availability zones, as mentioned earlier in the prerequisites.

  4. In the Units box, select the number of scale units that you want in the location.

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

  6. Select Apply, and then select Save.

Screenshot that shows selections for migrating an existing location of API Management instance that's not injected in a virtual network.

Existing gateway location (stv1 platform) injected in a virtual network

To migrate an existing location of your API Management instance to availability zones when the instance is currently injected in a virtual network and is currently hosted on the stv1 platform, use the following steps. Migrating to availability zones also migrates the instance to the stv2 platform.

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

  2. In the Azure portal, go to your API Management instance.

  3. On the Deployment + infrastructure menu, select Locations.

  4. In the Location box, select the location to be migrated. The location must support availability zones, as mentioned earlier in the prerequisites.

  5. In the Units box, select the number of scale units that you want in the location.

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

  7. In the respective boxes under Network, select the new subnet and new public IP address in the location.

  8. Select Apply, and then select Save.

Screenshot that shows selections for migrating an existing location of an API Management instance that's injected in a virtual network.

Existing gateway location (stv2 platform) injected in a virtual network

To migrate an existing location of your API Management instance to availability zones when the instance is currently injected in a virtual network and is already hosted on the stv2 platform:

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

  2. In the Azure portal, go to your API Management instance.

  3. On the Deployment + infrastructure menu, select Locations.

  4. In the Location box, select the location to be migrated. The location must support availability zones, as mentioned earlier in the prerequisites.

  5. In the Units box, select the number of scale units that you want in the location.

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

  7. In the Public IP Address box, select the new public IP address in the location.

  8. Select Apply, and then select Save.

Screenshot that shows selections for migrating an existing location of an API Management instance (stv2 platform) that's injected in a virtual network.

New gateway location

To add a new location to your API Management instance and enable availability zones in that location:

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

  2. In the Azure portal, go to your API Management instance.

  3. On the Deployment + infrastructure menu, select Locations.

  4. Select + Add to add a new location. The location must support availability zones, as mentioned earlier in the prerequisites.

  5. In the Units box, select the number of scale units that you want in the location.

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

  7. If your API Management instance is deployed in a virtual network, use the boxes under Network to select the virtual network, subnet, and public IP address that are available in the location.

  8. Select Add, and then select Save.

Screenshot that shows selections for adding a new location for an API Management instance with or without a virtual network.