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

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

问题描述

我刚刚开始在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

这里有什么我想念的吗?在常规配置"中,我启用了始终开启",但自定义域的性能仍然相同.

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:

  • 检查通过域名连接到您的Web应用程序中是否存在可能重试或等待响应的逻辑.

  • 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.

例如通过使用 Ultratools的DNS速度测试来检查DNS的速度.

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是一种可自定义的整理工具,可通过检查代码中的最佳做法和常见错误来帮助您改善网站的可访问性,速度,跨浏览器兼容性,以及其他功能.

            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 App加载缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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