You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "chongg039 (via GitHub)" <gi...@apache.org> on 2024/01/29 06:33:25 UTC

[I] LB切换channel时如何感知并发起应用层握手 (brpc)

chongg039 opened a new issue, #2527:
URL: https://github.com/apache/brpc/issues/2527

   **Describe the bug (描述bug)**
   
   请教下,我们的场景是下游配置n个server,client用一致性哈希选择一个server建立连接。期望的动作时在
   1. 第一次发起连接请求
   2. FO切换连接
   时,client首先需要和服务端交互,类似应用层握手,成功后返回状态,此时client才能正常发送数据。
   
   我看了下代码,貌似DynamicPartitionChannel内部都是IssueRPC的时候选择一个可用的channel,应用层并无类似的hook调用方式感知到变化。请问有什么相关的经验可以借鉴吗
   
   **To Reproduce (复现方法)**
   
   
   **Expected behavior (期望行为)**
   
   
   **Versions (各种版本)**
   OS:
   Compiler:
   brpc:
   protobuf:
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


-- 
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-unsubscribe@brpc.apache.org.apache.org

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


Re: [I] stream rpc能否搭配dynamic partition channel使用 (brpc)

Posted by "chongg039 (via GitHub)" <gi...@apache.org>.
chongg039 commented on issue #2527:
URL: https://github.com/apache/brpc/issues/2527#issuecomment-1920592824

   ![image](https://github.com/apache/brpc/assets/18239939/495ff7e1-a514-4d10-8bb1-a934a898d516)
   看了下普通的channel也支持负载均衡,写了个简单的FO测试,能够通过stream write的返回值判断连接状态。此时重新握手能够切换到另一个server,应该能满足要求。但还是没仔细看为什么Selective Channel不支持。


-- 
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-unsubscribe@brpc.apache.org

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


Re: [I] LB切换channel时如何感知并发起应用层握手 (brpc)

Posted by "chongg039 (via GitHub)" <gi...@apache.org>.
chongg039 commented on issue #2527:
URL: https://github.com/apache/brpc/issues/2527#issuecomment-1916225569

   我发现stream rpc的实现,重新包装一下应该能满足大部分需求,就是不知道是否可以搭配partition channel使用?


-- 
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-unsubscribe@brpc.apache.org

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