domain-name-system – 随机化DNS名称服务器

前端之家收集整理的这篇文章主要介绍了domain-name-system – 随机化DNS名称服务器前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
是否可以在Unix系统上的/etc/resolv.conf中列出多个名称服务器,并在进行dns查询而不仅仅是第一个查询时使用随机名称服务器解析dns查询

解决方法

对于 Linux系统,我使用/etc/resolv.conf中的超时和旋转选项……我通常将DNS超时降低到1秒.
timeout:n
    sets the amount of time the resolver will wait for a response from a remote name server
    before  retrying  the  query  via  a  different  name server.  Measured in seconds,the
    default is RES_TIMEOUT (currently 5,see  <resolv.h>).   The  maximum  value  for  this
    option is silently capped to 30.

rotate 
    sets RES_ROTATE in _res.options,which causes round robin selection of nameservers from
    among  those  listed.  This has the effect of spreading the query load among all listed
    servers,rather than having all clients try the first listed server first every time.

猜你在找的HTML相关文章