You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2020/07/10 14:00:15 UTC

[GitHub] [incubator-brpc] zyearn commented on issue #1154: 支持设置tcp_user_timeout

zyearn commented on issue #1154:
URL: https://github.com/apache/incubator-brpc/issues/1154#issuecomment-656691854


   这里有两种情况:
   1. 对端出现异常断网/掉电,client端的tcp连接无法感知(可以通过加SO_KEEPALIVE解决),这时如果server不启动,client就会持续发流量,当server一恢复,client就会收到“Connection reset by peer”,然后下一次rpc会重新建tcp连接。
   2. 对端正常重启,client端会直接关闭掉当前的socket,下一次rpc也会重建连接。
   
   在上述两个情况下,都会新建tcp连接,所以你描述的“因tcp重传的backoff机制,导致server端恢复110秒后, client端才请求成功“听起来是一直在用同一个tcp连接,但这似乎不会发生,可以具体描述一下导致你下这一结论的数据/现象么


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org