http 1.1 短连接双方均可主动关闭

connection section URL:
https://tools.ietf.org/html/rfc2616#section-14.10

connection section内容:

1
2
HTTP/1.1 defines the "close" connection option for the sender to signal that the connection will be closed after completion of the response. For example:
Connection: close

       即双方都可以关闭。 “HTTP: The Definitive Guide” 也是这样表述的。 实际上,在 “HTTP: The Definitive Guide” (英文版)p85 中讨论了一模一样的关于 TIME_WAIT 的问题。基本结论是:这个 TIME_WAIT 在 benchmark 的情况下会影响同一台 client 可以发起的请求数量;在实际应用中几乎没有问题。Server 保持 TIME_WAIT 并不是保持 socket,而只是保持一个记录,表示“对应这两个 end-point 的 packet 应该丢弃”,仅此而已。

本文作者:娄梦轩
本文地址https://sunnylou.github.io/2019/04/12/http-1-1-短连接双方均可主动关闭/
版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 CN 许可协议。转载请注明出处!