连接字符串DNS查找是否被缓存? [英] Do connection string DNS lookups get cached?

查看:112
本文介绍了连接字符串DNS查找是否被缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设以下内容:

我在 database.mywebsite.com 上建立了一个数据库,其解析为IP 111.111 .1.1 ,从我们网络上的本地DNS服务器运行。

I have a database set up on database.mywebsite.com, which resolves to IP 111.111.1.1, running from a local DNS server on our network.

我有无数的ASP,ASP.NET和WinForms应用程序,这些应用程序使用< b> database.mywebsite.com 作为服务器名称,全部从内部网络运行。

I have countless ASP, ASP.NET and WinForms applications that use a connection string utilising database.mywebsite.com as the server name, all running from the internal network.

然后,运行数据库的框消失了,我切换了到IP为 222.222.2.2 的新框中。

Then the box running the database dies, and I switch over to a new box with an IP of 222.222.2.2.

因此,我为 database.mywebsite.com 指向 222.222.2.2

运行它们的所有应用程序和计算机是否都将缓存旧的已解析IP地址?

Will all the applications and computers running them have cached the old resolved IP address?

我假设他们会的。

任何与相似的建议不幸的是,每次切换框时您的IP更改都不是很受欢迎,因为我无法控制这种情况。我们目前使用的是机器的机器名称,该名称每次消失时都会更改,并且所有应用程序等都必须使用新的机器名称进行更新。

Any suggestions along the lines of "don't have your IP change each time you switch box" are not too welcome as I cannot control this aspect of the situation, unfortunately. We are currently using the machine name of the box, which changes every time it dies and all apps etc. have to be updated with the new machine name. It hurts.

推荐答案

即使DNS不在计算机本地缓存,它也可能会缓存在DNS链的某个位置在计算机和名称服务器之间,至少有一小段时间。我的理解是,这种情况通常是通过IP接管来解决的,您只需将新机器制造为111.111.1.1。

Even if the DNS is not cached local to the machine, it will likely be cached somewhere along the DNS chain between the machine and the name servers, at least for a short while. My understanding is this situation would usually be handled with IP takeover where you just make the new machine 111.111.1.1.

可能是服务器故障的问题。

Probably a question for serverfault.

这篇关于连接字符串DNS查找是否被缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆