大网数据广告活动
服务器运维问答

How do I find out which DNS is being used, or which is the optimal one to speed up website response

· 52CE 我爱测

I have a server which hosts a website and also multiple API's. Lately when we try to access the website there is a delay that lasts a few seconds before actually loading. I have a good suspicion that this is due to some DNS setti…

问题原文

原帖链接 · EmL · CC BY-SA 4.0

I have a server which hosts a website and also multiple API's. Lately when we try to access the website there is a delay that lasts a few seconds before actually loading. I have a good suspicion that this is due to some DNS setting. Is there a way to find out which DNS the server is actually using?

My /etc/resolv.conf file looks like this:

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 212.227.123.16
nameserver 212.227.123.17

I know the first 2 are from google, and the remaining are from ionos, strangely enough, one of our websites seem to throw an error if the last two entries (ionos) are not on that resolv.conf.

已采纳解答

原帖链接 · surfingonthenet · CC BY-SA 4.0

DNS timeout use to be something like 10-15 seconds. To test domain resolution, you can access your server and execute nslookup:

nslookup yourdomain.com 8.8.8.8
nslookup yourdomain.com 8.8.4.4
nslookup yourdomain.com 1.1.1.1

so you can check how much time does it take to resolve DNS via different name server, and confirm if any of them are slowing it down or not answering

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-12-10)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。