brpc icon indicating copy to clipboard operation
brpc copied to clipboard

stream rpc能否搭配dynamic partition channel使用

Open chongg039 opened this issue 1 year ago • 4 comments

Describe the bug (描述bug)

请教一下,下游n个server一致性哈希。上游能否使用stream rpc连接dynamic pattition channel,并且在切换连接是stream rpc应用层能感知到,并且能够重新发起握手RPC?

To Reproduce (复现方法)

Expected behavior (期望行为)

Versions (各种版本) OS: Compiler: brpc: protobuf:

Additional context/screenshots (更多上下文/截图)

chongg039 avatar Jan 29 '24 06:01 chongg039

我直接在dynamic partition channel上创建stream,好像Accept不成功,麻烦帮忙看看呢,是不是不能这样用,LB是c_murmurhash image

chongg039 avatar Jan 31 '24 03:01 chongg039

实验了一下selective channel和partition channel都会在Accept的时候报错No stream along with this request,对应找不到remote_stream_settings: image

chongg039 avatar Jan 31 '24 08:01 chongg039

@jamesge 请教一下大佬,是不是不能这样写,如果需要用到stream的保序,并且允许stream切换下游连接,有没有什么workaround的办法实现

chongg039 avatar Jan 31 '24 08:01 chongg039

image 看了下普通的channel也支持负载均衡,写了个简单的FO测试,能够通过stream write的返回值判断连接状态。此时重新握手能够切换到另一个server,应该能满足要求。但还是没仔细看为什么Selective Channel不支持。

chongg039 avatar Feb 01 '24 06:02 chongg039