wwbmmm commented on PR #2177: URL: https://github.com/apache/brpc/pull/2177#issuecomment-2768058612
> 这个方案看起来可行,可以将SocketPool(或许得改了名字,不应该叫SocketPool了)抽象成基类,各个连接模式(single、pooled、short和待支持的multi #536)实现对应的SocketPool。或许single跟目前的short一样,单独实现一个函数即可。 > > 以下是当前的方案: > > 1. 抽象SocketPool为基类,各个连接模式(single、pooled、short和待支持的multi)实现对应的SocketPool。main socket的状态是屏蔽状态,SocketPool的sub socket是连接状态。sub socket的一些Failed连接状态会使得main socket屏蔽状态变成Failed。 > 2. 正常模式下,LB屏蔽Failed main socket。当全部main socket都是Failed,返回第一次选到实例的main socket。 > 3. RPC AddressFailedAsWell(main socket)后,根据连接模式,获取sub socket进行通信。 看起来没问题 -- 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. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org