Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在两个位置 location1 和 location2 有一个 Web 服务,现在我的应用程序应该从 location1 访问该服务,如果它在 location1 不可用,那么只有它必须转到 location2 我可以根据我的要求使用 C# 务实地配置 dns
在 DNS 上,可以配置重复主机记录指向不同的 IP 以产生负载均衡效果,但无法通过 DNS 检测到“不可用状态”。即使您可以通过编程方式配置 DNS 记录,DNS 仍然需要时间来刷新本地缓存和服务器缓存。