Skip to content

Commit 37fdf21

Browse files
committed
Merge branch 'patch-4' of https://github.com/sbdoroff/azure-docs-pr into afdtroubleshooting
2 parents de9258f + e0d008d commit 37fdf21

File tree

1 file changed

+187
-0
lines changed

1 file changed

+187
-0
lines changed
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
---
2+
title: 'General Performance Troubleshooting of Azure Front Door'
3+
titleSuffix: Azure Front Door
4+
description: In this article, investigate, diagnose and resolve potential latency or bandwidth issues associated with an Azure Front Door related site performance
5+
services: frontdoor
6+
author: stdoroff
7+
ms.service: frontdoor
8+
ms.topic: how-to
9+
ms.workload: infrastructure-services
10+
ms.date: 08/30/2023
11+
ms.author: stdoroff
12+
#Customer intent: As a <type of user>, I want <some goal> so that <some reason>.
13+
---
14+
15+
# Azure Front Door Performance
16+
17+
Performance issues can originate in several potential areas. This guide will assist in identifying which hop along the data-path is most likely the root of the issue and how to resolve. As a brief overview, the issue could be at the Azure Front Door (AFD), the origin, the requesting client or the path between any of these hops.
18+
19+
## Check for Known Issues
20+
21+
Before beginning, be sure to check for any [known issues on the AFD platform](https://azure.status.microsoft/status), any known ISPs in the path or on the requesting client's ability to connect and retrieve data.
22+
23+
## Scenario 1: Investigate the Origin
24+
25+
If one of the origin servers are slow then the first request for an object via the AFD will also be slow. Further, if the content is not being cached at the AFD's Point of Presence (POP), every request will be forwarded to the origin, negating the benefit of the POP's proximity to the requesting client, and relying on the origin's performance.
26+
27+
### Scenario 1 | Environment Information Needed
28+
29+
- AFD / Endpoint Name
30+
- Endpoint Hostname
31+
- Endpoint Custom Domain (if applicable)
32+
- Origin Hostname
33+
- Full URL of Affected File
34+
35+
### Scenario 1 | Troubleshooting Steps
36+
37+
1. Check the response headers from the affected request
38+
39+
> [!TIP]
40+
> To check response headers, utilize your browser's Developer Tools (F12), select the *Networking* tab, then the relevant file to be investigated, then the *Headers* tab. ***If the file is missing*** the page need to be reloaded with Developer Tools (F12) open.
41+
42+
- The initial response should have an *x-cache* header with *TCP_MISS* value
43+
- Requests with this value are being forwarded by the AFD's POP to the origin and returning on that same path to the requesting client
44+
- Examples
45+
- TCP_MISS
46+
47+
```bash
48+
$ curl -I "https://S*******.z01.azurefd.net/media/EteSQSGXMAYVUN_?format=jpg&name=large"
49+
HTTP/2 200
50+
cache-control: max-age=604800, must-revalidate
51+
content-length: 248381
52+
content-type: image/jpeg
53+
last-modified: Fri, 05 Feb 2021 15:34:05 GMT
54+
accept-ranges: bytes
55+
age: 0
56+
server: ECS (sjc/4E76)
57+
x-xcachep2c-originurl: https://p****.com:443/media/EteSQSGXMAYVUN_? format=jpg&name=large
58+
x-xcachep2c-originip: 72.21.91.70
59+
access-control-allow-origin: *
60+
access-control-expose-headers: Content-Length
61+
strict-transport-security: max-age=631138519
62+
surrogate-key: media media/bucket/9 media/1357714621109579782
63+
x-cache: TCP_MISS
64+
x-connection-hash: 8c9ea346f78166a032b347a42d8cc561
65+
x-content-type-options: nosniff
66+
x-response-time: 26
67+
x-tw-cdn: VZ
68+
x-azure-ref-originshield: 0MlAkYAAAAACtEkUH8vEbTIFoZe4xuRLOU0pDRURHRTA1MDgAZDM0ZjBhNGUtMjc4
69+
x-azure-ref: 0MlAkYAAAAACayEVNiWaKRI61MXUgRe97REFMRURHRTEwMTQAZDM0ZjBhNGUtMjc4
70+
date: Wed, 10 Feb 2021 21:29:22 GMT
71+
```
72+
73+
- TCP_HIT
74+
75+
```bash
76+
$ curl -I "https://S*******.z01.azurefd.net/media/EteSQSGXMAYVUN_?format=jpg&name=large"
77+
HTTP/2 200
78+
cache-control: max-age=604800, must-revalidate
79+
content-length: 248381
80+
content-type: image/jpeg
81+
last-modified: Fri, 05 Feb 2021 15:34:05 GMT
82+
accept-ranges: bytes
83+
age: 0
84+
server: ECS (sjc/4E76)
85+
x-xcachep2c-originurl: https://p****.com:443/media/EteSQSGXMAYVUN_?format=jpg&name=large
86+
x-xcachep2c-originip: 72.21.91.70
87+
access-control-allow-origin: *
88+
access-control-expose-headers: Content-Length
89+
strict-transport-security: max-age=631138519
90+
surrogate-key: media media/bucket/9 media/1357714621109579782
91+
x-cache: TCP_HIT
92+
x-connection-hash: 8c9ea346f78166a032b347a42d8cc561
93+
x-content-type-options: nosniff
94+
x-response-time: 26
95+
x-tw-cdn: VZ
96+
x-azure-ref-originshield: 0MlAkYAAAAACtEkUH8vEbTIFoZe4xuRLOU0pDRURHRTA1MDgAZDM0ZjBhNGUtMjc4Mi00OWVhLWIzNTYtN2MzYj
97+
x-azure-ref: 0NVAkYAAAAABHk4Fx0cOtQrp6cHFRf0ocREFMRURHRTEwMDUAZDM0ZjBhNGUtMjc4Mi00OWVhLWIzNTYtN2MzYj
98+
date: Wed, 10 Feb 2021 21:29:25 GMT
99+
```
100+
101+
1. Continue to request against the endpoint until the *x-cache* header has a *TCP_HIT* value
102+
1. ***If the performance issue is resolved***, then the issue was based on the origin's speed, and is not the of the AFD's performance. The AFD's cache settings or the origin will need to be address by it's owner to resolve the performance issue.
103+
1. ***If the issue persists***, then the issue may be with the client requesting the content or the AFD
104+
A. Move to Scenario 2 to identify
105+
106+
## Scenario 2: A Single Client or Location (ie. ISP) is Slow
107+
108+
This could happen if there is a bad network route between the requesting client and the AFD POP. Any bad route should be ruled out as it will affect the distance to the POP, removing the AFD POP's proximity benefit.
109+
110+
This could be because of an ISP issue, the customer is using a VPN or they are a part of a corporate network that runs all traffic through a central, remote point.
111+
112+
### Scenario 2 | Environment Information Needed
113+
114+
- AFD / Endpoint Name
115+
- Endpoint Hostname
116+
- Endpoint Custom Domain (if applicable)
117+
- Origin Hostname
118+
- Full URL of Affected File
119+
- Requesting Client Information
120+
- Requesting Client IP
121+
- Requesting Client Location
122+
- Requesting Client Path to Azure Environment (Usually identified with [TraceRoute](/windows-server/administration/windows-commands/tracert), [PathPing](/windows-server/administration/windows-commands/pathping) or a similar tool).
123+
124+
### Scenario 2 | Troubleshooting Steps
125+
126+
1. To check the path to the POP, use [PathPing](https://learn.microsoft.com/windows-server/administration/windows-commands/pathping) or similar tool for 500 packets to check the network route. *PathPing maxes at 250 queries. To test to 500, run the below query twice*
127+
128+
```Console
129+
pathping /q 250 <Full URL of Affected File>
130+
```
131+
132+
1. Determine if the traffic is taking a path that would add time or travel to a distant region
133+
- Look for IP, city or country codes that do not take a reasonable route based on the customer’s geography (ie. a customer in Europe getting routed to the United States), or excessive number of hops
134+
1. Test from a different requesting client in the same region
135+
1. **If additional hops or remote regions are identified**, the issue will be with the client accessing the AFD POP and not with the AFD itself. This will need to be addressed by the connectivity or VPN provider.
136+
1. **If additional hops or remote regions are not identified** AND the content is being served from cache (x-cache: TCP_HIT), the issue will likely be with the AFD and a Support Request may need to be created. Include a reference to this troubleshooting article and steps taken.
137+
- ***Note***: If the content is being served from the origin (x-cache: TCP_MISS), see Scenario 1<insert link when available>
138+
139+
## Scenario 3: A Website Loads Slowly
140+
141+
There are some scenarios where there is ***not*** an issue with a single file but the performance of the whole, AFD proxied, webpage is unsatisfactory. This will usually be revealed by a webpage performance tool and will show under performance compared to the webpage outside of AFD.
142+
143+
A webpage will often consist of many files. The way the AFD offers benefit for the webpage is if each file in the webpage is being served from the origin linked to the AFD and the AFD is configured to optimize the delivery of that file. For example:
144+
145+
- Origin: origin.contoso.com
146+
- AFD Custom Domain: contoso.com
147+
- Page customer attempts to load: https://contoso.com
148+
- **Explanation**: When the page loads, the initial file at the "/" directory calls other files which build the page. These are images, javascript, text files and more. If those files are not called via the AFD hostname, *contoso.com*, the AFD will ***not*** be utilized. So, if one of the file requested by the website is *http://www.images.fabrikam.com/businessimage.jpg* the file will ***not*** benefit from the use of the AFD. Instead, the file will be requested directly, from the *images.fabrikam.com* server, by the browser on the requesting client .
149+
150+
:::image type="content" source="..." alt-text="Example of multiple, differently sourced files for a singular website and how it affects AFD performance":::
151+
152+
### Scenario 3 | Environment Information Needed
153+
154+
- AFD / Endpoint Name
155+
- Endpoint Hostname
156+
- Endpoint Custom Domain (if applicable)
157+
- Origin Hostname
158+
- Geographical location of the origin
159+
- Full URL of Affected Webpage
160+
- Tool and metric which is measuring performance
161+
162+
### Scenario 3 | Troubleshooting
163+
164+
1. Review the metric which is showing the slower performance
165+
> [!IMPORTANT]
166+
> If it is based on a third part tool, Microsoft cannot discern what is being measure by tools not owned by Microsoft
167+
1. Pull up the AFD webpage in a Browser with Developer Tools (F12) enabled
168+
> [!NOTE]
169+
> Developer tools in your browser can be used to determine the source of the files being served
170+
1. Note the source of files
171+
1. Identify which files are utilizing the AFD hostname and which are not
172+
A. Example: From the above example, an AFD hosted image would be something like https://www.contoso.com/productimage1.jpg and that which is not would be something like http://www.images.fabrikam.com/businessimage.jpg
173+
1. Once gathered test performance for file being served from AFD, its origin and, if applicable, the testing webpage
174+
> [!IMPORTANT]
175+
> If the origin or testing webpage is served from a geographical region closer to the tool testing performance, a tool or requesting client may need to be used in another region to examine the AFD POP's proximity benefit
176+
177+
> [!CAUTION]
178+
> If files are meant to be cached, be sure to test files that have the response header *x-cache: TCP_HIT*
179+
180+
> [!IMPORTANT]
181+
> Any files served from outside the AFD's hostname will not be able to benefit from it and the webpage may need to be redesigned to do so
182+
183+
1. **If the collected data shows that files are being issued from servers outside the AFD's hostname or performance is better at the AFD**, the AFD is working as expected
184+
A. This may require a change in webpage design, for assistance in optimizing your website to leverage an AFD, connect with your website design team or our [Microsoft Solution Providers](https://www.microsoft.com/solution-providers/home)
185+
> [!NOTE]
186+
> This issue could take time to review based on the complexity of a website's design and it's file calling instructions
187+
1. **If the collected data shows that performance is ***not*** better at the AFD**, a Support Request is likely required for further investigation. Include a reference to this troubleshooting article and steps taken.

0 commit comments

Comments
 (0)