Web App on Azure loaded slow after applying custom domain

若如初见. 提交于 2021-01-27 07:26:37

问题


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 -> loaded in few seconds

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.

Custom Domains set up :

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


回答1:


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.

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

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.

  • Run this from a command line and see information about how to get to your domain:
nslookup
> set debug
<your-domain-name>
  • Consider adding a service like Cloudflare to your website.

Protect and accelerate your websites, apps, and teams.

  • Run webhint (or any other tool that gives you insight) on your custom domain.

It does more than just performance:

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.



来源:https://stackoverflow.com/questions/61929095/web-app-on-azure-loaded-slow-after-applying-custom-domain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!