Skip to content

Commit 765ec4b

Browse files
author
gitName
committed
restored heading/intro
1 parent d005c52 commit 765ec4b

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

articles/api-management/backends.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -239,16 +239,25 @@ Use a backend pool for scenarios such as the following:
239239

240240
API Management supports the following load balancing options for backend pools:
241241

242-
* **Round-robin**: By default, requests are distributed evenly across the backends in the pool.
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-
> [!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.
242+
| Load balancing option | Description |
243+
|------------------|-------------|
244+
| **Round-robin** | Requests are distributed evenly across the backends in the pool by default. |
245+
| **Weighted** | Weights are assigned to the backends in the pool, and requests are distributed based on the relative weight of each backend. Useful for scenarios such as blue-green deployments. |
246+
| **Priority-based** | Backends are organized into priority groups. Requests are sent to higher priority groups first; within a group, requests are distributed evenly or according to assigned weights. |
247+
248+
> [!NOTE]
249+
> Backends in lower priority groups will only be used when all backends in higher priority groups are unavailable because circuit breaker rules are tripped.
250+
251+
### Session awareness
247252

248253
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.
249254

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).
255+
> [!NOTE]
256+
> Session awareness in load-balanced pools is being released first to the **AI Gateway Early** [update group](configure-service-update-settings.md).
257+
258+
### Example
259+
260+
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*.
252261

253262

254263
#### [Portal](#tab/portal)
@@ -268,7 +277,7 @@ With any of the preceding load balancing options, optionally enable **session aw
268277

269278
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.
270279

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.
280+
This example includes an optional `sessionAffinity` pool configuration for session awareness. It sets a cookie so that requests from a user session are routed to a specific backend in the pool.
272281

273282
```bicep
274283
resource symbolicname 'Microsoft.ApiManagement/service/backends@2023-09-01-preview' = {
@@ -303,7 +312,7 @@ resource symbolicname 'Microsoft.ApiManagement/service/backends@2023-09-01-previ
303312

304313
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.
305314

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.
315+
This example includes an optional `sessionAffinity` pool configuration for session awareness. It sets a cookie so that requests from a user session are routed to a specific backend in the pool.
307316

308317

309318
```json

0 commit comments

Comments
 (0)