Microsoft Azure Traffic Manager

[亡魂溺海] 提交于 2020-01-04 05:53:45

问题


I've created an Azure Traffic Manager profile which uses failover as the load balancing method. The primary endpoint is an on-premises website test.company.com. The other endpoint is an Azure Website App which has a custom domain name xxx.mysite.com. When I added the endpoint to Traffic Manager it points to mysite.azurewebsites.net.

I've created a CNAME record at the ISP to point xxx.mysite.com to mycompany.trafficmanager.net.

When I stop the primary website to simulate a failover to the second website I get Error 404 - Web App Not Found. If I go directly to mycompany.trafficmanager.net it works as expected and displays the xxx.mysite.com website.

What am I missing in the configuration so that when I failover it displays the xxx.mysite.com website?


回答1:


How soon are you checking for the failover?

Azure Traffic Manager is a DNS routing system, not a load-balancer. Using DNS will always have latency with changes. By default, Traffic Manager uses a TTL of 300 which is 5 minutes (300 seconds).

This means any clients (like web browsers) will only check for a new address every 5 minutes, and that's if they actually follow the TTL value and dont cache the DNS entry even longer. There are also lots of DNS proxies and caches (like in your ISP) that can still cache the old DNS entry. Regardless, any updates will take minutes at least before clients go to the failover site.

You can lower the TTL although this will increase the queries/charges and might decrease performance if you have lots of usage. If you absolutely can't have any downtime then you'll have to look into running an actual load-balancer that will handle the traffic directly and send it to the right place.




回答2:


Can you check and see if the custom domain is also added to the web app? e.g. something.mysite.com is registered as a custom hostname with mysite.azurewebsites.net.

If that step isn't done, then when the request is routed to the azurewebsites app, it will fail because there is nothing configuration wise to indicate that something.mysite.com is really mysite.azurewebsites.net.



来源:https://stackoverflow.com/questions/33527681/microsoft-azure-traffic-manager

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