Skip to content

Commit 7313dc1

Browse files
committed
made minor edits and added new portal pictures
1 parent b882d33 commit 7313dc1

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

articles/application-gateway/how-to-troubleshoot-application-gateway-session-affinity-issues.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,35 @@ Learn how to diagnose and resolve session affinity issues with Azure Application
2323
The cookie-based session affinity feature is useful to keep a user session on the same server. By using gateway-managed cookies, the Application Gateway can direct subsequent traffic from a user session to the same server for processing. This is important in cases where session state is saved locally on the server for a user session. Session affinity is also known as sticky sessions.
2424

2525
> [!NOTE]
26-
> Application Gateway v1 issues a cookie called ARRAffinity, which is used to direct traffic to the same backend pool member. In Application Gateway v2, this cookie has been renamed to ApplicationGatewayAffinity. For the purposes of this document, ApplicationGatewayAffinity will be used as an example, ARRAffinity can be substituted in where applicable for Application Gateway v1 instances.
26+
> Application Gateway v1 issues a cookie called ARRAffinity, which is used to direct traffic to the same backend pool member. In Application Gateway v2, this cookie was renamed to ApplicationGatewayAffinity. For the purposes of this document, ApplicationGatewayAffinity is used as an example, ARRAffinity can be substituted in where applicable for Application Gateway v1 instances.
2727
2828
## Possible problem causes
2929

30-
The problem in maintaining cookie-based session affinity may happen due to the following main reasons:
30+
The problem in maintaining cookie-based session affinity can happen due to the following main reasons:
3131

32-
- “Cookie-based Affinity” setting is not enabled
33-
- Your application cannot handle cookie-based affinity
32+
- “Cookie-based Affinity” setting isn't enabled
33+
- Your application can't handle cookie-based affinity
3434
- Application is using cookie-based affinity but requests still bouncing between backend servers
3535

3636
### Check whether the "Cookie-based Affinity” setting is enabled
3737

38-
Sometimes the session affinity issues might occur when you forget to enable “Cookie based affinity” setting. To determine whether you have enabled the “Cookie based affinity” setting on the HTTP Settings tab in the Azure portal, follow the instructions:
38+
Sometimes the session affinity issues might occur when you forget to enable “Cookie based affinity” setting. To determine whether you enabled the “Cookie based affinity” setting on the Backend Settings tab in the Azure portal, follow the instructions:
3939

40-
1. Log on to the [Azure portal](https://portal.azure.com/).
40+
1. Sign in to the [Azure portal](https://portal.azure.com/).
4141

42-
2. In the **left navigation** pane, click **All resources**. Click the application gateway name in the All resources blade. If the subscription that you selected already has several resources in it, you can enter the application gateway name in the **Filter by name…** box to easily access the application gateway.
42+
2. In the **left navigation** pane, select **All resources**. Select the application gateway name in the All resources blade. If the subscription that you selected already has several resources in it, you can enter the application gateway name in the **Filter by name…** box to easily access the application gateway.
4343

44-
3. Select **HTTP settings** tab under **SETTINGS**.
44+
3. Select **Backend settings** tab under **SETTINGS**.
4545

46-
![Screenshot shows SETTINGS with H T T P settings selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-1.png)
46+
![Screenshot shows SETTINGS with Backend settings selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-1.png)
4747

48-
4. Select the HTTP setting, and on the **Add HTTP setting** page, check if **Cookie based affinity** is enabled.
48+
4. Select the backend setting, and on the **Add Backend setting** page, check if **Cookie based affinity** is enabled.
4949

5050
![Screenshot shows the gateway settings for an app gateway, including whether Cookie based affinity is selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-2.png)
5151

5252

5353

54-
You can also check the value of the “**CookieBasedAffinity**” is set to *Enabled*under "**backendHttpSettingsCollection**" by using one of the following methods:
54+
You can also check the value of the “**CookieBasedAffinity**” is set to *Enabled* under "**backendHttpSettingsCollection**" by using one of the following methods:
5555

5656
- Run [Get-AzApplicationGatewayBackendHttpSetting](/powershell/module/az.network/get-azapplicationgatewaybackendhttpsetting) in PowerShell
5757
- Look through the JSON file by using the Azure Resource Manager template
@@ -60,28 +60,28 @@ You can also check the value of the “**CookieBasedAffinity**” is set to *Ena
6060
"cookieBasedAffinity": "Enabled",
6161
```
6262

63-
### The application cannot handle cookie-based affinity
63+
### The application can't handle cookie-based affinity
6464

6565
#### Cause
6666

6767
The application gateway can only perform session-based affinity by using a cookie.
6868

6969
#### Workaround
7070

71-
If the application cannot handle cookie-based affinity, you must use an external or internal azure load balancer or another third-party solution.
71+
If the application can't handle cookie-based affinity, you must use an external or internal Azure load balancer or another third-party solution.
7272

7373
### Application is using cookie-based affinity but requests still bouncing between backend servers
7474

7575
#### Symptom
7676

77-
You have enabled the Cookie-based Affinity setting, when you access the Application Gateway by using a short name URL in Internet Explorer, for example: `http://website` , the request is still bouncing between backend servers.
77+
You enabled the Cookie-based Affinity setting, when you access the Application Gateway by using a short name URL in Internet Explorer, for example: `http://website` , the request is still bouncing between backend servers.
7878

7979
To identify this issue, follow the instructions:
8080

81-
1. Take a web debugger trace on the “Client” which is connecting to the application behind the Application Gateway(We are using Fiddler in this example).
81+
1. Take a web debugger trace on the “Client” which is connecting to the application behind the Application Gateway(We're using Fiddler in this example).
8282
**Tip** If you don't know how to use the Fiddler, check the option "**I want to collect network traffic and analyze it using web debugger**" at the bottom.
8383

84-
2. Check and analyze the session logs, to determine whether the cookies provided by the client have the ApplicationGatewayAffinity details. If you don't find the ApplicationGatewayAffinity details, such as "**ApplicationGatewayAffinity=** *ApplicationGatewayAffinityValue*" within the cookie set, that means the client is not replying with the ApplicationGatewayAffinity cookie, which is provided by the Application Gateway.
84+
2. Check and analyze the session logs, to determine whether the cookies provided by the client have the ApplicationGatewayAffinity details. If you don't find the ApplicationGatewayAffinity details, such as "**ApplicationGatewayAffinity=** *ApplicationGatewayAffinityValue*" within the cookie set, that means the client isn't replying with the ApplicationGatewayAffinity cookie, which is provided by the Application Gateway.
8585
For example:
8686

8787
![Screenshot shows a session log with a single entry highlighted.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-3.png)
@@ -96,7 +96,7 @@ This issue occurs because Internet Explorer and other browsers may not store or
9696

9797
#### Resolution
9898

99-
To fix this issue, you should access the Application Gateway by using a FQDN. For example, use [http://website.com](https://website.com/) or [http://appgw.website.com](http://website.com/) .
99+
To fix this issue, you should access the Application Gateway by using a Fully Qualified Domain Name (FQDN). For example, use [http://website.com](https://website.com/) or [http://appgw.website.com](http://website.com/) .
100100

101101
## Additional logs to troubleshoot
102102

@@ -127,9 +127,9 @@ Enable logging using the Azure portal.
127127

128128
### Use web debugger to capture and analyze the HTTP or HTTPS traffics
129129

130-
Web debugging tools like Fiddler, can help you debug web applications by capturing network traffic between the Internet and test computers. These tools enable you to inspect incoming and outgoing data as the browser receives/sends them. Fiddler, in this example, has the HTTP replay option that can help you troubleshoot client-side issues with web applications, especially for authentication kind of issue.
130+
Web debugging tools like Fiddler can help you debug web applications by capturing network traffic between the Internet and test computers. These tools enable you to inspect incoming and outgoing data as the browser receives/sends them. Fiddler, in this example, has the HTTP replay option that can help you troubleshoot client-side issues with web applications, especially for authenticaton issues.
131131

132-
Use the web debugger of your choice. In this sample we will use Fiddler to capture and analyze http or https traffics, follow the instructions:
132+
Use the web debugger of your choice. In this sample we'll use Fiddler to capture and analyze http or https traffics, follow the instructions:
133133

134134
1. Download [Fiddler](https://www.telerik.com/download/fiddler).
135135

@@ -144,23 +144,23 @@ Use the web debugger of your choice. In this sample we will use Fiddler to captu
144144

145145
![Screenshot shows the Fiddler Web Debugger with the Capturing indicator highlighted.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-13.png)
146146

147-
4. Most likely, you will be interested in decrypted HTTPS traffic, and you can enable HTTPS decryption by selecting **Tools** > **Fiddler Options**, and check the box " **Decrypt HTTPS traffic**".
147+
4. Most likely, you'll be interested in decrypted HTTPS traffic, and you can enable HTTPS decryption by selecting **Tools** > **Fiddler Options**, and check the box " **Decrypt HTTPS traffic**".
148148

149149
![Screenshot shows Options in Fiddler with H T T P selected and Decrypt HTTPS traffic selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-14.png)
150150

151151
5. You can remove previous unrelated sessions before reproducing the issue by clicking **X** (icon) > **Remove All** as follow screenshot:
152152

153153
![Screenshot shows the X icon selected, which displays the Remove all option.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-15.png)
154154

155-
6. Once you have reproduced the issue, save the file for review by selecting **File** > **Save** > **All Sessions..**.
155+
6. Once you reproduce the issue, save the file for review by selecting **File** > **Save** > **All Sessions..**.
156156

157157
![Screenshot shows the File Save All Sessions option selected.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-16.png)
158158

159159
7. Check and analyze the session logs to determine what the issue is.
160160

161161
For examples:
162162

163-
- **Example A:** You find a session log that the request is sent from the client, and it goes to the public IP address of the Application Gateway, click this log to view the details. On the right side, data in the bottom box is what the Application Gateway is returning to the client. Select the “RAW” tab and determine whether the client is receiving a "**Set-Cookie: ApplicationGatewayAffinity=** *ApplicationGatewayAffinityValue*." If there's no cookie, session affinity isn't set, or the Application Gateway isn't applying cookie back to the client.
163+
- **Example A:** You find a session log that the request is sent from the client, and it goes to the public IP address of the Application Gateway, select this log to view the details. On the right side, data in the bottom box is what the Application Gateway is returning to the client. Select the “RAW” tab and determine whether the client is receiving a "**Set-Cookie: ApplicationGatewayAffinity=** *ApplicationGatewayAffinityValue*." If there's no cookie, session affinity isn't set, or the Application Gateway isn't applying cookie back to the client.
164164

165165
> [!NOTE]
166166
> This ApplicationGatewayAffinity value is the cookie-id, that the Application Gateway sets for the client to be sent to a particular backend server.
@@ -172,10 +172,10 @@ Use the web debugger of your choice. In this sample we will use Fiddler to captu
172172
![Screenshot shows an example of details of a log entry with a cookie highlighted.](./media/how-to-troubleshoot-application-gateway-session-affinity-issues/troubleshoot-session-affinity-issues-18.png)
173173

174174
> [!NOTE]
175-
> For the same communication session, the cookie should not to change. Check the top box on the right side, select "Cookies" tab to see whether the client is using the cookie and sending it back to the Application Gateway. If not, the client browser isn't keeping and using the cookie for conversations. Sometimes, the client might lie.
175+
> For the same communication session, the cookie shouldn't change. Check the top box on the right side, select "Cookies" tab to see whether the client is using the cookie and sending it back to the Application Gateway. If not, the client browser isn't keeping and using the cookie for conversations. Sometimes, the client might lie.
176176
177177

178178

179179
## Next steps
180180

181-
If the preceding steps do not resolve the issue, open a [support ticket](https://azure.microsoft.com/support/options/).
181+
If the preceding steps don't resolve the issue, open a [support ticket](https://azure.microsoft.com/support/options/).
Loading
Loading

0 commit comments

Comments
 (0)