gpt4 book ai didi

browser - 浏览器如何处理来自 DNS 的单个主机名的多个 IP 响应?

转载 作者:行者123 更新时间:2023-12-01 02:53:44 25 4
gpt4 key购买 nike

我想知道这是如何处理的或者是否有标准?

最佳答案

浏览器会缓存 DNS 响应几分钟,并且通常会尝试与 DNS 响应中返回的第一个 IP 地址建立连接。使用相同的 IP 直到缓存过期。

Internet Explorer caches DNS lookups for 30 minutes by default, as specified by the DnsCacheTimeout registry setting. Firefox caches DNS lookups for 1 minute, controlled by the network.dnsCacheExpiration configuration setting.

From: Yahoo Dev Network: Best Practices for Speeding Up Your Web Site



因此,对于用于负载平衡目的的多个 IP 地址,DNS 服务器必须更改响应中提供的地址的顺序,随机或以连续的“ round robin”方式选择顺序。事实上,这通常是 DNS 服务器在响应具有多个 A 记录的主机名时的默认行为。

There is no standard procedure for deciding which address will be used by the requesting application - a few resolvers attempt to re-order the list to give priority to numerically "closer" networks. Some desktop clients do try alternate addresses after a connection timeout of 30-45 seconds.

From: Wikipedia: Round robin DNS

关于browser - 浏览器如何处理来自 DNS 的单个主机名的多个 IP 响应?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3866831/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com