ajax/websocket 域名搜索服务为何如此之快?
我已经使用 ajaxwhois 多年了,现在有很多这样的服务用于查找域名。
最快的似乎是使用某种 websocket 将接口连接到数据;但我还是不太明白它怎么这么快。
简单地从 shell 执行 whoiswhatever.com
会产生明显的延迟。这些服务真的只是使用 whois 发出一堆直接请求(并行)并解析数据,还是有其他一些方法在逃避我?
编辑:我应该清楚,我对 ajax/socket 的速度并不感到困惑/好奇;即使假设服务器->接口延迟为 0 毫秒,我也不明白查询本身是如何如此快地进行的。
编辑2:链接
I have been using ajaxwhois for years, and there are many of these services for finding domain names now.
The fastest seem to use some sort of websocket to connect the interface to the data; but I still don't quite get how it is so lightning fast.
Simply doing a whois whatever.com
from a shell has a noticeable delay. Are these services really just making a bunch of direct requests (in parallel) using whois and parsing the data, or is there some other method that is escaping me?
edit: I should be clear in that I am not confused/curious about the speediness of ajax/sockets; even assuming the server->interface delay is 0ms I don't understand how the queries themselves are being made so quickly.
edit2: links
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的猜测是服务器缓存结果,并且可能每 x 小时在服务器端刷新它们。所以 AJAX 脚本所做的就是获取缓存的结果。您可以通过输入一个常见的域名(如
mathematics.com
)来测试这一点,搜索结果会非常快,然后输入一个不常见的域名(如howareajaxwebsocketdomainsearchingservicessofast.com
),这将非常快。显示出明显的延迟,与 shell 命令显示的情况相同。My guess is the server caches the results, and probably refreshes them server-side every x hours. So all the AJAX script does, is get the cached result. You can test this by entering a common domain name like
mathematics.com
, where the search results will be very fast, and then an uncommon domain name likehowareajaxwebsocketdomainsearchingservicessofast.com
which will show a noticeable delay, the same showed by a shell command.您还可以将 ns 查找作为检查的一部分。其他方式也是可能的。例如,许多注册商提供免费服务,仅当域名免费注册时才会响应,这比解析 whois 快得多。如果您有权访问 epp,您还可以在注册系统中进行检查。因此有 4 种检查方法。这一切都取决于 TLD 和
You could also do ns lookup as a part of the check. Other ways is also possible. For example many registrars has free servises that only respond if the domain is free for regitration that is mutch faster that parsing whois. If you have access to epp you could also check in the registration system.. so there is 4 ways to check. It all dep on what TLD and