Skip to content

Commit 8a5e5fa

Browse files
Merge branch 'main' into edits0528
2 parents 9ebbb9d + e20f0a1 commit 8a5e5fa

File tree

187 files changed

+1253
-1385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+1253
-1385
lines changed

articles/active-directory-b2c/authorization-code-flow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ A successful token response looks like this:
233233
| access_token |The signed JWT that you requested. |
234234
| scope |The scopes that the token is valid for. You also can use the scopes to cache tokens for later use. |
235235
| expires_in |The length of time that the token is valid (in seconds). |
236-
| refresh_token |An OAuth 2.0 refresh token. The app can use this token to acquire additional tokens after the current token expires. Refresh tokens are long-lived, and can be used to retain access to resources for extended periods of time. For more information, see the [Azure AD B2C token reference](tokens-overview.md). |
236+
| refresh_token |An OAuth 2.0 refresh token. The app can use this token to acquire additional tokens after the current token expires. Refresh tokens are long-lived and can be used to retain access to resources for extended periods of time. For more information, see the [Azure AD B2C token reference](tokens-overview.md). |
237237

238238
Error responses look like this:
239239

articles/active-directory-b2c/custom-policies-series-call-rest-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ to:
216216
```xml
217217
<ValidationTechnicalProfile ReferenceId="ValidateAccessCodeViaHttp"/>
218218
```
219-
At this point, the Technical Profile with `Id` *CheckAccessCodeViaClaimsTransformationChecker* isn't needed, and can be removed.
219+
At this point, the Technical Profile with `Id` *CheckAccessCodeViaClaimsTransformationChecker* isn't needed and can be removed.
220220

221221

222222
## Step 3 - Upload custom policy file

articles/api-management/api-management-howto-mutual-certificates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ After the certificate is uploaded, it shows in the **Certificates** window. If y
6969
> This change is effective immediately, and calls to operations of that API will use the certificate to authenticate on the backend server.
7070
7171
> [!TIP]
72-
> When a certificate is specified for gateway authentication for the backend service of an API, it becomes part of the policy for that API, and can be viewed in the policy editor.
72+
> When a certificate is specified for gateway authentication for the backend service of an API, it becomes part of the policy for that API and can be viewed in the policy editor.
7373
7474
## Disable certificate chain validation for self-signed certificates
7575

articles/api-management/api-management-key-concepts-experiment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Operations in API Management are highly configurable, with control over URL mapp
135135

136136
### Products
137137

138-
Products are how APIs are surfaced to developers. Products in API Management have one or more APIs, and can be *open* or *protected*. Protected products require a subscription key, while open products can be consumed freely.
138+
Products are how APIs are surfaced to developers. Products in API Management have one or more APIs and can be *open* or *protected*. Protected products require a subscription key, while open products can be consumed freely.
139139

140140
When a product is ready for use by developers, it can be published. Once published, it can be viewed or subscribed to by developers. Subscription approval is configured at the product level and can either require an administrator's approval or be automatic.
141141

articles/api-management/api-management-key-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Operations in API Management are highly configurable, with control over URL mapp
163163

164164
### Products
165165

166-
Products are how APIs are surfaced to API consumers such as app developers. Products in API Management have one or more APIs, and can be *open* or *protected*. Protected products require a subscription key, while open products can be consumed freely.
166+
Products are how APIs are surfaced to API consumers such as app developers. Products in API Management have one or more APIs and can be *open* or *protected*. Protected products require a subscription key, while open products can be consumed freely.
167167

168168
When a product is ready for use by consumers, it can be published. Once published, it can be viewed or subscribed to by users through the developer portal. Subscription approval is configured at the product level and can either require an administrator's approval or be automatic.
169169

articles/api-management/backends.md

Lines changed: 74 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: api-management
55
author: dlepow
66
ms.service: azure-api-management
77
ms.topic: concept-article
8-
ms.date: 04/01/2025
8+
ms.date: 05/20/2025
99
ms.author: danlep
1010
ms.custom:
1111
- build-2024
@@ -239,16 +239,63 @@ 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-
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+
246248
> [!NOTE]
247249
> Backends in lower priority groups will only be used when all backends in higher priority groups are unavailable because circuit breaker rules are tripped.
248250
251+
### Session awareness
252+
253+
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 session ID 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.
254+
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+
#### Manage cookies for session awareness
259+
260+
When using session awareness, the client must handle cookies appropriately. The client needs to store the `Set-Cookie` header value and send it with subsequent requests to maintain session state.
261+
262+
You can use API Management policies to help set cookies for session awareness. For example, for the case of the Assistants API (a feature of [Azure OpenAI in Azure AI Foundry Models](/azure/ai-services/openai/concepts/models)), the client needs to keep the session ID, extract the thread ID from the body, and keep the pair and send the right cookie for each call. Moreover, the client needs to know when to send a cookie or when not to send a cookie header. These requirements can be handled appropriately by defining the following example policies:
263+
264+
265+
```xml
266+
<policies>
267+
  <inbound>
268+
    <base />
269+
    <set-backend-service backend-id="APIMBackend" />
270+
  </inbound>
271+
  <backend>
272+
    <base />
273+
  </backend>
274+
  <outbound>
275+
    <base />
276+
    <set-variable name="gwSetCookie" value="@{
277+
      var payload = context.Response.Body.As<JObject>();
278+
      var threadId = payload["id"];
279+
      var gwSetCookieHeaderValue = context.Request.Headers.GetValueOrDefault("SetCookie", string.Empty);
280+
      if(!string.IsNullOrEmpty(gwSetCookieHeaderValue))
281+
      {
282+
        gwSetCookieHeaderValue = gwSetCookieHeaderValue + $";Path=/threads/{threadId};";
283+
      }
284+
      return gwSetCookieHeaderValue;
285+
    }" />
286+
    <set-header name="Set-Cookie" exists-action="override">
287+
      <value>Cookie=gwSetCookieHeaderValue</value>
288+
    </set-header>
289+
  </outbound>
290+
  <on-error>
291+
    <base />
292+
  </on-error>
293+
</policies>
294+
```
295+
249296
### Example
250297

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* .
298+
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*.
252299

253300

254301
#### [Portal](#tab/portal)
@@ -266,7 +313,9 @@ Use the portal, API Management [REST API](/rest/api/apimanagement/backend), or a
266313

267314
#### [Bicep](#tab/bicep)
268315

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:
316+
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.
317+
318+
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.
270319

271320
```bicep
272321
resource symbolicname 'Microsoft.ApiManagement/service/backends@2023-09-01-preview' = {
@@ -286,14 +335,23 @@ resource symbolicname 'Microsoft.ApiManagement/service/backends@2023-09-01-previ
286335
priority: 1
287336
weight: 1
288337
}
289-
]
338+
],
339+
      "sessionAffinity": {
340+
        "sessionId": {
341+
          "source": "Cookie",
342+
          "name": "SessionId"
343+
        }
344+
      }
290345
}
291346
}
292347
}
293348
```
294349
#### [ARM](#tab/arm)
295350

296-
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:
351+
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.
352+
353+
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.
354+
297355

298356
```json
299357
{
@@ -315,7 +373,13 @@ Include a JSON snippet similar to the following in your ARM template for a load-
315373
"priority": "1",
316374
          "weight": "1"
317375
}
318-
]
376+
],
377+
      "sessionAffinity": {
378+
        "sessionId": {
379+
          "source": "Cookie",
380+
          "name": "SessionId"
381+
        }
382+
      }
319383
}
320384
}
321385
}

articles/application-gateway/self-signed-certificates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The Application Gateway v2 SKU introduces the use of Trusted Root Certificates t
1818
Application Gateway trusts your website's certificate by default if it's signed by a well-known CA (for example, GoDaddy or DigiCert). You don't need to explicitly upload the root certificate in that case. For more information, see [Overview of TLS termination and end to end TLS with Application Gateway](ssl-overview.md). However, if you have a dev/test environment and don't want to purchase a verified CA signed certificate, you can create your own custom Root CA and a leaf certificate signed by that Root CA.
1919

2020
> [!NOTE]
21-
> Self-generated certificates are not trusted by default, and can be difficult to maintain. Also, they may use outdated hash and cipher suites that may not be strong. For better security, purchase a certificate signed by a well-known certificate authority.
21+
> Self-generated certificates aren't trusted by default and can be difficult to maintain. Also, they may use outdated hash and cipher suites that may not be strong. For better security, purchase a certificate signed by a well-known certificate authority.
2222
2323
**You can use the following options to generate your private certificate for backend TLS connections.**
2424
1. Use the one-click private [**certificate generator tool**](https://appgwbackendcertgenerator.azurewebsites.net/). Using the domain name (Common Name) that you provide, this tool performs the same steps as documented in this article to generate Root and Server certificates. With the generated certificate files, you can immediately upload the Root certificate (.CER) file to the Backend Setting of your gateway and the corresponding certificate chain (.PFX) to the backend server. The password for the PFX file is also supplied in the downloaded ZIP file.

articles/automation/troubleshoot/shared-resources.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ A module is stuck in the *Importing* state when you're importing or updating you
2222

2323
#### Cause
2424

25-
Because importing PowerShell modules is a complex, multistep process, a module might not import correctly, and can be stuck in a transient state. To learn more about the import process, see [Importing a PowerShell module](/powershell/scripting/developer/module/importing-a-powershell-module#the-importing-process).
25+
Because importing PowerShell modules is a complex, multistep process, a module might not import correctly and can be stuck in a transient state. To learn more about the import process, see [Importing a PowerShell module](/powershell/scripting/developer/module/importing-a-powershell-module#the-importing-process).
2626

2727
#### Resolution
2828

articles/azure-app-configuration/howto-best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ To address these concerns, we recommend that you use a proxy service between you
239239

240240
## Multitenant applications in App Configuration
241241

242-
A multitenant application is built on an architecture where a shared instance of your application serves multiple customers or tenants. For example, you may have an email service that offers your users separate accounts and customized experiences. Your application usually manages different configurations for each tenant. Here are some architectural considerations for [using App Configuration in a multitenant application](/azure/architecture/guide/multitenant/service/app-configuration).
242+
A multitenant application is built on an architecture where a shared instance of your application serves multiple customers or tenants. For example, you may have an email service that offers your users separate accounts and customized experiences. Your application usually manages different configurations for each tenant. Here are some architectural considerations for [using App Configuration in a multitenant application](/azure/architecture/guide/multitenant/service/app-configuration). You can also reference the [example code for multitenant application setup](https://github.com/Azure/AppConfiguration/blob/main/examples/DotNetCore/MultiTenantApplicationSetup/README.md).
243243

244244
## Configuration as Code
245245

articles/azure-cache-for-redis/cache-best-practices-kubernetes.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,51 @@
11
---
2-
title: Best practices for hosting a Kubernetes client application
3-
description: Learn how to host a Kubernetes client application.
2+
title: Best practices for Kubernetes-hosted client apps
3+
description: Learn about best practices for using Azure Cache for Redis in Kubernetes-hosted client applications.
44
ms.custom: linux-related-content, ignite-2024
55
ms.topic: conceptual
6-
ms.date: 11/10/2023
6+
ms.date: 05/28/2025
77
appliesto:
88
- ✅ Azure Cache for Redis
99

1010
---
1111

12-
# Kubernetes-hosted client application
12+
# Kubernetes-hosted client applications
1313

14-
## Client connections from multiple pods
14+
This article provides best practices for using Azure Cache for Redis in Kubernetes-hosted client applications.
1515

16-
When you have multiple pods connecting to a Redis server, make sure the new connections from the pods are created in a staggered manner. If multiple pods start in a short time without staggering, it causes a sudden spike in the number of client connections created. The high number of connections leads to high load on the Redis server and might cause timeouts.
16+
## Stagger multiple connections
1717

18-
Avoid the same scenario when shutting down multiple pods at the same time. Failing to stagger shutdown might cause a steep dip in the number of connections that leads to CPU pressure.
18+
Make sure to stagger multiple pod connections to a Redis server. Starting multiple pods in a short time without staggering causes a sudden spike in the number of client connections, leading to high load on the Redis server and possible timeouts.
1919

20-
## Sufficient pod resources
20+
Also avoid shutting down multiple pods at the same time. Failing to stagger shutdown might cause a steep dip in the number of connections leading to CPU pressure.
2121

22-
Ensure that the pod running your client application is given enough CPU and memory resources. If the client application is running close to its resource limits, it can result in timeouts.
22+
## Provide sufficient pod resources
2323

24-
## Sufficient node resources
24+
Make sure to give the pod running your client application enough CPU and memory resources. Client applications running close to their resource limits can lead to timeouts.
2525

26-
A pod running the client application can be affected by other pods running on the same node and throttle Redis connections or IO operations. So always ensure that the node on which your client application pods run have enough memory, CPU, and network bandwidth. Running low on any of these resources could result in connectivity issues.
26+
## Provide sufficient node resources
2727

28-
## Linux-hosted client applications and TCP settings
28+
The pod running the client application can be affected by other pods running on the same node, and throttle Redis connections or IO operations. Make sure the nodes that run your client application pods have enough memory, CPU, and network bandwidth. Insufficient amounts of these resources could result in connectivity issues.
2929

30-
If your Azure Cache for Redis client application runs on a Linux-based container, we recommend updating some TCP settings. These settings are detailed in [TCP settings for Linux-hosted client applications](cache-best-practices-connection.md#tcp-settings-for-linux-hosted-client-applications).
30+
## Check TCP settings for Linux applications
3131

32-
## Potential connection collision with _Istio/Envoy_
32+
If your Azure Redis client application runs on a Linux-based container, make sure your TCP settings match the [TCP settings for Linux-hosted client applications](cache-best-practices-connection.md#tcp-settings-for-linux-hosted-client-applications).
33+
34+
## Avoid connection collision with Istio
3335

3436
<!-- Currently, Azure Cache for Redis uses ports 15xxx for clustered caches to expose cluster nodes to client applications. As documented [here](https://istio.io/latest/docs/ops/deployment/application-requirements/#ports-used-by-istio), the same ports are also used by _Istio.io_ sidecar proxy called _Envoy_ and could interfere with creating connections, especially on port 15001 and 15006. -->
3537

36-
When using _Istio_ with an Azure Managed Redis cluster, consider excluding the potential collision ports with an [istio annotation](https://istio.io/latest/docs/reference/config/annotations/).
38+
If you use Istio with an Azure Managed Redis cluster, consider excluding potential collision ports with the following [Istio annotation](https://istio.io/latest/docs/reference/config/annotations/):
3739

38-
```
40+
```console
3941
annotations:
4042
traffic.sidecar.istio.io/excludeOutboundPorts: "15000,15001,15004,15006,15008,15009,15020"
4143
```
4244

43-
To avoid connection interference, we recommend:
45+
To avoid connection interference:
4446

45-
- Consider using a nonclustered cache or an Enterprise tier cache instead
46-
- Avoid configuring _Istio_ sidecars on pods running Azure Cache for Redis client code
47+
- Consider using a nonclustered cache or an Azure Managed Redis cache instead.
48+
- Avoid configuring Istio sidecars on pods running Azure Redis client code.
4749

4850
## Related content
4951

0 commit comments

Comments
 (0)