You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/api-management-howto-deploy-multi-region.md
+42-6Lines changed: 42 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to deploy a Premium tier Azure API Management instance to
5
5
author: dlepow
6
6
ms.service: api-management
7
7
ms.topic: how-to
8
-
ms.date: 09/27/2022
8
+
ms.date: 01/26/2023
9
9
ms.author: danlep
10
10
---
11
11
@@ -50,18 +50,16 @@ When adding a region, you configure:
50
50
## <aname="remove-region"> </a>Remove an API Management service region
51
51
52
52
1. In the Azure portal, navigate to your API Management service and select **Locations** from the left menu.
53
-
2. For the location you would like to remove, select the context menu using the **...** button at the right end of the table. Select **Delete**.
54
-
3. Confirm the deletion and select **Save** to apply the changes.
53
+
1. For the location you would like to remove, select the context menu using the **...** button at the right end of the table. Select **Delete**.
54
+
1. Confirm the deletion and select **Save** to apply the changes.
55
+
55
56
56
57
## <aname="route-backend"> </a>Route API calls to regional backend services
57
58
58
59
By default, each API routes requests to a single backend service URL. Even if you've configured Azure API Management gateways in various regions, the API gateway will still forward requests to the same backend service, which is deployed in only one region. In this case, the performance gain will come only from responses cached within Azure API Management in a region specific to the request; contacting the backend across the globe may still cause high latency.
59
60
60
61
To take advantage of geographical distribution of your system, you should have backend services deployed in the same regions as Azure API Management instances. Then, using policies and `@(context.Deployment.Region)` property, you can route the traffic to local instances of your backend.
61
62
62
-
> [!TIP]
63
-
> Optionally set the `disableGateway` property in a regional gateway to disable routing of API traffic there. For example, temporarily disable a regional gateway when testing or updating a regional backend service.
64
-
65
63
1. Navigate to your Azure API Management instance and select **APIs** from the left menu.
66
64
2. Select your desired API.
67
65
3. Select **Code editor** from the arrow dropdown in the **Inbound processing**.
@@ -118,6 +116,44 @@ API Management routes the requests to a regional gateway based on [the lowest la
118
116
1. [Configure the API Management regional status endpoints in Traffic Manager](../traffic-manager/traffic-manager-monitoring.md). The regional status endpoints follow the URL pattern of `https://<service-name>-<region>-01.regional.azure-api.net/status-0123456789abcdef`, for example `https://contoso-westus2-01.regional.azure-api.net/status-0123456789abcdef`.
119
117
1. Specify [the routing method](../traffic-manager/traffic-manager-routing-methods.md) of the Traffic Manager.
120
118
119
+
## Disable routing to a regional gateway
120
+
121
+
Under some conditions, you might need to temporarily disable routing to one of the regional gateways. For example:
122
+
123
+
* After adding a new region, to keep it disabled while you configure and test the regional backend service
124
+
* During regular backend maintenance in a region
125
+
* To redirect traffic to other regions during a planned disaster recovery drill that simulates an unavailable region, or during a regional failure
126
+
127
+
To disable routing to a regional gateway in your API Management instance, update the gateway's `disableGateway` property value to `true`. You can set the value using the [Create or update service](/rest/api/apimanagement/current-ga/api-management-service/create-or-update) REST API, the [az apim update](/cli/azure/apim#az-apim-update) command in the Azure CLI, the [set-azapimanagement](/powershell/module/az.apimanagement/set-azapimanagement) Azure PowerShell cmdlet, or other Azure tools.
128
+
129
+
To disable a regional gateway using the Azure CLI:
130
+
131
+
1. Use the [az apim show](/cli/azure/apim#az-apim-show) command to show the locations, gateway status, and regional URLs configured for the API Management instance.
132
+
```azurecli
133
+
az apim show --name contoso --resource-group myResourceGroup \
0 commit comments