How is VIP swapping + CNAMEs better than IP swapping + A records?

五迷三道 提交于 2019-12-08 02:07:22

问题


I'm in the middle of updating my DNS setup to use all CNAMEs instead of A records, because I need support for VIP swaps between Staging and Production. I can't use A records for this because that puts a dependency on a VIP that will be changing for each deployment.

Previously, I was using A records because of wildcard AND base domain support - I could map mydomain.com and all subdomains to the VIP and everything just worked.

CNAMEs make this a bit more complicated, but not impossible.

My question(s) is - with VIP swaps, the site url (mysite.cloudapp.net) needs to change from pointing to the original VIP, to the new VIP, right? If so, doesn't DNS need to propagate anyways? What happens to all of the cached DNS records that have mysite.cloudapp.net pointing to the original VIP? Isn't there still a delayed propagation, and a chance that requests will get forwarded to the old VIP while this propagation occurs?


回答1:


A VIP swap is an internal change to Azure's routers/load balancers, not an external DNS change. They're just routing traffic to go from one internal [set of] server[s] to another instead. Therefore the DNS info for mysite.cloudapp.net doesn't change at all. Therefore the change for people accessing via the IP bound to mysite.cloudapp.net (and CNAME'd by you) will see the change as soon as the VIP swap is complete.



来源:https://stackoverflow.com/questions/20863752/how-is-vip-swapping-cnames-better-than-ip-swapping-a-records

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