TCP-所有有关TCP的

所有有关TCP的全丢这里了
  • windows系统TCP连接建立的timeout https://serverfault.com/questions/193160/which-is-the-default-tcp-connect-timeout-in-windows#comment512310_193194
  • TSO 原理https://blog.youkuaiyun.com/dog250/article/details/47055121
  • Kernel Line Tracing: Linux perf Rides the Rocket http://www.brendangregg.com/blog/2014-09-11/perf-kernel-line-tracing.html
  • TUN/TAP网卡 https://blog.youkuaiyun.com/dog250/article/details/80414228
  • Linux ethtool 网络开关 http://manpages.ubuntu.com/manpages/precise/man8/ethtool.8.html
  • scatter/gather 分散聚合IO http://book.51cto.com/art/201206/345018.htm
    https://www.ibm.com/support/knowledgecenter/en/linuxonibm/com.ibm.linux.z.lgdd/lgdd_t_qeth_wrk_packing.html
  • skb_buff解释 https://blog.youkuaiyun.com/farmwang/article/details/54233975
  • Linux系统调用listen中的参数backlog TCP协议栈 accept队列 http://blog.chinaunix.net/uid-28541347-id-5748886.html
  • 和上面的内容类似 但更详细,但不太清晰 https://blog.youkuaiyun.com/sinat_20184565/article/details/87887118
  • 和前两个是一个话题,这个引入了进程上下文切换,细节又更多了:http://www.cnhalo.net/2016/07/13/linux-tcp-prequeue-backlog/ 此人博客不错!这个是这篇文章中的参考:评价linux协议栈tcp实现中的prequeue
  • 此人是和Nginx问题结合,Client和Server出现半连接,ESTABLISH数目不一致:http://blog.chinaunix.net/uid-20662820-id-4154399.html
  • TCP连接的Accept队列 https://blog.youkuaiyun.com/sinat_20184565/article/details/87887118
  • 高级TCP指标 https://satori-monitoring.readthedocs.io/zh/latest/builtin-metrics/tcpext.html
  • TCP丢包问题排查 https://blog.51cto.com/11819159/2126061
  • Linux网络协议栈中的数据结构 http://blog.chinaunix.net/uid-14518381-id-3397881.html
  • TCP中的seq/ack number https://www.jianshu.com/p/15754b4e9458
  • TCP那些事儿 酷壳 https://coolshell.cn/articles/11564.html
  • 虚拟网卡驱动原理 https://www.ibm.com/developerworks/cn/linux/l-tuntap/
  • TCP keepalive最佳实践 https://www.veritas.com/content/support/en_US/article.100028680.html
  • GSO/TSO/GRO等对VirtIO虚机的网络性能影响分析(by quqi99) https://blog.youkuaiyun.com/quqi99/article/details/51066800
  • 关于TUN/TAP网卡二三事以及物理网卡Ring buffer https://blog.youkuaiyun.com/dog250/article/details/80414228
  • TCP连接的建立和终止 详解 https://blog.youkuaiyun.com/g_brightboy/article/details/819176
  • tcp十一种状态及问题处理方法 https://blog.youkuaiyun.com/bzfys/article/details/73733917
  • 列举一下我知道的各中间件在TCP上遇到的坑
    1. zookeeper旧版本曾经没有给选主Socket设置keepAlive(TCP keepalive for leader election connections),导致需要重新选主时选主连接处于半开状态,造成长时间选主
    2. redis空闲超时配置时间过短,jedis(一种访问redis的客户端)没有正确处理CLOSE_WAIT状态的socket导致拿到不新鲜的连接进而更新失败
    3. Apache HTTPClient(具体来说应该是PoolingHttpClientConnectionManager)在持有一批TCP连接,在使用前没有设置验证连接有效性导致在CLOSE_WAIT状态socket下进行写,然后读,当然读到的长度为0(见博文:2021-07-28 CLOSE_WAIT下继续读写会怎样?),然后报错在parseHead;为什么会处于CLOSE_WAIT状态呢?因为HTTPServer端都会有个keepAlive时间设置,服务器可以主动断开连接。但是HTTPClient似乎有自动重试
UDP
  • UDP是无连接的,它只是简单地把IP来的数据分组定向给特定进程,一个UDP sock用一个二元组标识,即本地IP和端口,没有连接的概念也就无关上次发送和接下来的接收时的源是谁!当然也可以在recvmsg中指定源地址信息,也可以调用connect,但它并不向TCP那样建立连接进行三次握手.如下man connectman系统调用很有意思

If the socket sockfd is of type SOCK_DGRAM, then addr is the address to which datagrams are sent by default, and the only address from which datagrams are
received. If the socket is of type SOCK_STREAM or SOCK_SEQPACKET, this call attempts to make a connection to the socket that is bound to the address specified by addr.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值