Skip to content

Commit 87ababb

Browse files
committed
review feedback
1 parent 0338307 commit 87ababb

2 files changed

Lines changed: 32 additions & 6 deletions

File tree

articles/api-management/api-management-api-import-restrictions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ Namespaces other than the target aren't preserved on export. While you can impor
255255
WSDL files can define multiple services and endpoints (ports) by one or more `wsdl:service` and `wsdl:port` elements. However, the API Management gateway is able to import and proxy requests to only a single service and endpoint. If multiple services or endpoints are defined in the WSDL file, identify the target service name and endpoint when importing the API by using the [wsdlSelector](/rest/api/apimanagement/apis/create-or-update#wsdlselector) property.
256256

257257
> [!TIP]
258-
> If you want to load-balance requests across multiple services and endpoints, consider configuring a [backend pool](backends.md#load-balanced-pool-preview).
258+
> If you want to load-balance requests across multiple services and endpoints, consider configuring a [load-balanced backend pool](backends.md#load-balanced-pool-preview).
259259
260260
### Arrays
261261
SOAP-to-REST transformation supports only wrapped arrays shown in the example below:

articles/api-management/backends.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ editor: ''
88

99
ms.service: api-management
1010
ms.topic: article
11-
ms.date: 01/08/2024
11+
ms.date: 01/09/2024
1212
ms.author: danlep
1313
ms.custom:
1414
---
@@ -26,7 +26,13 @@ API Management also supports using other Azure resources as an API backend, such
2626
* A [Service Fabric cluster](how-to-configure-service-fabric-backend.md).
2727
* A custom service.
2828

29-
API Management supports custom backends so you can manage the backend services of your API. Use custom backends, for example, to authorize the credentials of requests to the backend service, to protect your backend from too many requests, or to load-balance requests to multiple backends. Configure and manage custom backends in the Azure portal, or using Azure APIs or tools.
29+
API Management supports custom backends so you can manage the backend services of your API. Use custom backends for one or more of the following:
30+
31+
* Authorize the credentials of requests to the backend service
32+
* Protect your backend from too many requests
33+
* Route or load-balance requests to multiple backends
34+
35+
Configure and manage custom backends in the Azure portal, or using Azure APIs or tools.
3036

3137
## Benefits of backends
3238

@@ -50,6 +56,27 @@ After creating a backend, you can reference the backend in your APIs. Use th
5056
<policies/>
5157
```
5258

59+
You can use conditional logic with the `set-backend-service` policy to change the effective backend based on location, gateway that was called, or other expressions.
60+
61+
For example, here is a policy to route traffic to another backend based on the gateway that was called:
62+
63+
<policies>
64+
<inbound>
65+
<base />
66+
<choose>
67+
<when condition="@(context.Deployment.Gateway.Id == "factory-gateway")">
68+
<set-backend-service backend-id="backend-on-prem" />
69+
</when>
70+
<when condition="@(context.Deployment.Gateway.IsManaged == false)">
71+
<set-backend-service backend-id="self-hosted-backend" />
72+
</when>
73+
<otherwise />
74+
</choose>
75+
</inbound>
76+
[...]
77+
<policies/>
78+
79+
5380
## Circuit breaker (preview)
5481

5582
Starting in API version 2023-03-01 preview, API Management exposes a [circuit breaker](/rest/api/apimanagement/current-preview/backend/create-or-update?tabs=HTTP#backendcircuitbreaker) property in the backend resource to protect a backend service from being overwhelmed by too many requests.
@@ -144,7 +171,6 @@ Use a backend pool for scenarios such as the following:
144171

145172
* Spread the load to multiple backends, which may have individual backend circuit breakers.
146173
* Shift the load from one set of backends to another for upgrade (blue-green deployment).
147-
* Fall back to a different region when the backend in the current region fails or is overloaded.
148174

149175
To create a backend pool, set the `type` property of the backend to `pool` and specify a list of single backends that make up the pool.
150176

@@ -163,7 +189,7 @@ resource symbolicname 'Microsoft.ApiManagement/service/backends@2023-05-01-previ
163189
description: 'Load balancer for multiple backends'
164190
type: 'Pool'
165191
protocol: 'http'
166-
url: 'http://does-not-matter'
192+
url: 'http://unused'
167193
pool: {
168194
services: [
169195
{
@@ -190,7 +216,7 @@ Include a JSON snippet similar to the following in your ARM template for a backe
190216
"description": "Load balancer for multiple backends",
191217
"type": "Pool",
192218
"protocol": "http",
193-
"url": "http://does-not-matter",
219+
"url": "http://unused",
194220
"pool": {
195221
"services": [
196222
{

0 commit comments

Comments
 (0)