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/backends.md
+28-11Lines changed: 28 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ services: api-management
5
5
author: dlepow
6
6
ms.service: azure-api-management
7
7
ms.topic: concept-article
8
-
ms.date: 04/01/2025
8
+
ms.date: 05/20/2025
9
9
ms.author: danlep
10
10
ms.custom:
11
11
- build-2024
@@ -241,14 +241,14 @@ API Management supports the following load balancing options for backend pools:
241
241
242
242
***Round-robin**: By default, requests are distributed evenly across the backends in the pool.
243
243
***Weighted**: Weights are assigned to the backends in the pool, and requests are distributed across the backends based on the relative weight assigned to each backend. Use this option for scenarios such as conducting a blue-green deployment.
244
-
***Priority-based**: Backends are organized in priority groups, and requests are sent to the backends in order of the priority groups. Within a priority group, requests are distributed either evenly across the backends, or (if assigned) according to the relative weight assigned to each backend.
245
-
246
-
> [!NOTE]
247
-
> Backends in lower priority groups will only be used when all backends in higher priority groups are unavailable because circuit breaker rules are tripped.
244
+
***Priority-based**: Backends are organized in priority groups, and requests are sent to the backends in order of the priority groups. Within a priority group, requests are distributed either evenly across the backends, or (if assigned) according to the relative weight assigned to each backend.
245
+
> [!NOTE]
246
+
> Backends in lower priority groups will only be used when all backends in higher priority groups are unavailable because circuit breaker rules are tripped.
248
247
249
-
### Example
248
+
With any of the preceding load balancing options, optionally enable **session awareness** (session affinity) to ensure that all requests from a specific user during a session are directed to the same backend in the pool. API Management sets a cookie to maintain session state. This option is useful, for example, in scenarios with backends such as AI chat assistants or other conversational agents to route requests from the same session to the same endpoint.
250
249
251
-
Use the portal, API Management [REST API](/rest/api/apimanagement/backend), or a Bicep or ARM template to configure a backend pool. In the following example, the backend *myBackendPool* in the API Management instance *myAPIM* is configured with a backend pool. Example backends in the pool are named *backend-1* and *backend-2*. Both backends are in the highest priority group; within the group, *backend-1* has a greater weight than *backend-2* .
250
+
> [!NOTE]
251
+
> Session awareness in load-balanced pools is being released first to the **AI Gateway Early**[update group](configure-service-update-settings.md).
252
252
253
253
254
254
#### [Portal](#tab/portal)
@@ -266,7 +266,9 @@ Use the portal, API Management [REST API](/rest/api/apimanagement/backend), or a
266
266
267
267
#### [Bicep](#tab/bicep)
268
268
269
-
Include a snippet similar to the following in your Bicep file for a load-balanced pool. Set the `type` property of the backend entity to `Pool` and specify the backends in the pool:
269
+
Include a snippet similar to the following in your Bicep file for a load-balanced pool. Set the `type` property of the backend entity to `Pool` and specify the backends in the pool.
270
+
271
+
This example includes an optional `sessionAffinity` pool configuration for session awareness. It sets a cookie so that requests from a user session are directed to a specific backend in the pool.
Include a JSON snippet similar to the following in your ARM template for a load-balanced pool. Set the `type` property of the backend resource to `Pool` and specify the backends in the pool:
304
+
Include a JSON snippet similar to the following in your ARM template for a load-balanced pool. Set the `type` property of the backend resource to `Pool` and specify the backends in the pool.
305
+
306
+
This example includes an optional `sessionAffinity` pool configuration for session awareness. It sets a cookie so that requests from a user session are directed to a specific backend in the pool.
307
+
297
308
298
309
```json
299
310
{
@@ -315,7 +326,13 @@ Include a JSON snippet similar to the following in your ARM template for a load-
0 commit comments