关于本地dns解析里的参数

来源:3-5 HTTP响应状态码拆解

修心光

2020-12-02

老师您好,我看了下我的dns解析中,这个options_timeout 1 … 这一行的配置当中的参数 以及增加这一行配置有什么作用呢,看了2篇文章,还是无法知其意。图片描述

写回答

1回答

风落几番

2020-12-03

timout 第一个参数 单位就是秒,就是控制UDP接收的超时时间

后边single-request-reopen,比较官方的解释是这样:

The resolver uses the same socket for the A and AAAA requests. Some hardware mistakenly only sends back one reply. When that happens the client sytem will sit and wait for the second reply. Turn- ing this option on changes this behavior so that if two requests from the same port are not handled correctly it will close the socket and open a new one before sending the second request.

意思就是如果来自同一端口的两个请求未得到正确处理,则会在发送第二个请求之前关闭socket并打开一个新的。避免的是什么呢?避免因为接收到一个返回没有接收到第二个而一直等待



0
1
修心光
非常感谢!
2020-12-04
共1条回复

大话HTTP协议 漫画+图解打造的编程基础课程

HTTP,如水如空气。漫画+图解,学习成体系。

1839 学习 · 82 问题

查看课程