应用自定义域后,Azure 上的 Web 应用加载缓慢 [英] Web App on Azure loaded slow after applying custom domain

查看:39
本文介绍了应用自定义域后,Azure 上的 Web 应用加载缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始在 Azure 上托管我的网站.最初在 xxxx.azurewebsites.net 上上传和托管网站时,性能和响应都很棒.添加自定义域(从Godaddy购买)后,性能变得最差,页面加载需要1分钟.

I just started hosting my website on Azure. Initially when uploading and hosting the website on xxxx.azurewebsites.net, the performance and response was great. After adding a custom domain (Bought from Godaddy), the performance became worst and it would take 1 min for a page to load.

xxxx.azurewebsites.net -> 在几秒钟内加载

xxxx.azurewebsites.net -> loaded in few seconds

xxxx.com -> 大约一分钟加载

xxxx.com -> loaded in almost a minute

这里有什么我遗漏的吗?在常规配置中,我启用了 Always On,但自定义域的性能仍然相同.

Is there anything im missing here? In General Configuration, I have enabled Always On but the performance is still the same for custom domains.

自定义域设置:

在 Chrome 网络工具中,我可以看到连接停止了至少 1 分钟.不知道是什么原因造成的.

In Chrome Network tools, I can see that the connection is stalled for at least 1 minutes. Not sure what causing this.

推荐答案

如果仅自定义域的性能(非常)糟糕,则可能是 DNS 设置不正确,或者托管在(非常)慢的 DNS 主机上.当然,也可能完全不同.

If the performance is (very) bad only with the custom domain, chances are DNS is either not setup correctly, or hosted on a (very) slow DNS host. Of course, it might be something else altogether.

以下几点可以帮助您确定问题:

Here's a few things that can help you determine the issue:

  • 检查您的网络应用程序中是否有任何逻辑可能会重试或等待通过域名连接到它时未获得的响应.

  • Check if there's any logic in your web app that might be retried or waiting for a response it is not getting when you're connecting to it through the domain name.

检查您的 DNS 速度,例如使用 Ultratools 的 DNS 速度测试.

Check the speed of your DNS, for instance by using Ultratools' DNS Speed Test.

DNS 托管速度工具将为您提供 DNS 树中每个级别的宝贵 DNS 性能信息,以协助进行性能评估和性能故障排除.

The DNS hosting speed tool will give you valuable DNS performance information for each level in the DNS tree to assist with performance evaluations and performance troubleshooting.

  • 从命令行运行此程序并查看有关如何访问您的域的信息:
  • nslookup
    > set debug
    <your-domain-name>
    

    • 考虑向您的网站添加诸如 Cloudflare 之类的服务.
      • Consider adding a service like Cloudflare to your website.
      • 保护和加速您的网站、应用和团队.

        Protect and accelerate your websites, apps, and teams.

        • 在您的自定义域上运行 webhint(或任何其他可以为您提供洞察力的工具).
          • Run webhint (or any other tool that gives you insight) on your custom domain.
          • 它不仅仅是性能:

            webhint 是一种可自定义的 linting 工具,可通过检查代码中的最佳做法和常见错误来帮助您提高网站的可访问性、速度、跨浏览器兼容性等.

            webhint is a customizable linting tool that helps you improve your site's accessibility, speed, cross-browser compatibility, and more by checking your code for best practices and common errors.

            这篇关于应用自定义域后,Azure 上的 Web 应用加载缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆