有关了解和使用引用字符串诊断和解决 Azure Front Door 问题的指南。
Prerequisites
- 你必须具有 Azure Front Door 配置文件。 若要创建配置文件,请参阅 “创建 Azure Front Door 配置文件”。
什么是引用字符串?
引用字符串也称为 RefString,是由 Azure Front Door 追加到每个请求的 HTTP 响应头的短字符串。 它提供有关请求的处理方式的详细信息,包括状态点 (POP) 和后端状态。
引用字符串可帮助排查和解决 Azure Front Door 的问题,例如缓存未命中、后端故障和延迟问题。 可以通过分析请求的引用字符串来确定根本原因并采取适当的措施来修复它。
Note
如果遇到了 Microsoft 服务的错误页,则它已包含生成错误页的请求的引用字符串。 在这种情况下,可以直接跳到诊断步骤。
如何收集引用字符串
To gather a Reference String, you need to capture the HTTP response headers of the requests and look for the header named X-Azure-Ref. This header contains the Reference String, encoded in Base64. 可以使用不同的方法来捕获 HTTP 响应头,具体取决于你的偏好和情况。 下面是如何从 Microsoft Edge 浏览器获取引用字符串的示例:
按
F12
或Ctrl+Shift+I
打开浏览器的开发人员工具。Go to the Network tab.
刷新页面或执行触发请求的操作。
Locate the specific request in the list and find the X-Azure-Ref header in the response headers section.
Copy the value of the X-Azure-Ref header to use with the Reference String troubleshooting tool in the Azure portal.
有关详细信息,请参阅检查网络活动 - Microsoft Edge 开发人员文档。
如何从 Microsoft Edge 浏览器获取引用字符串的示例:
如何将引用字符串与我们的一些故障排除工具结合使用
Note
诊断和解决问题尚不可用。
Alternative option
如果选择不使用诊断工具,则可以在提交支持工单时包括引用字符串。 Additionally, you can enable the Access Logs feature to receive updates on RefString data directly in the Azure portal.
有关如何跟踪引用和访问日志参数的详细信息,请参阅监视 Azure Front Door 中的指标和日志,其中重点介绍了访问日志中有助于识别各种错误类型的特定字段。
Next steps
- 若要详细了解如何应对常见问题,请参阅 Front Door 故障排除问题。
- 有关常见问题的解答,请参阅 Azure Front Door FAQ。