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 2022/01/11 06:54:31 UTC

[GitHub] [incubator-brpc] FancyJan opened a new issue #1668: 希望在ChannelBalancer的Describe方法中有办法获取remote_side信息

FancyJan opened a new issue #1668:
URL: https://github.com/apache/incubator-brpc/issues/1668


   **Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
   希望在组合channel的'ChannelBalancer::Describe'中有办法获取对应server_id的remote_side信息。
   
   **Describe the solution you'd like (描述你期望的解决方法)**
   https://github.com/apache/incubator-brpc/blob/master/src/brpc/selective_channel.cpp#L189
   1. 如果add的channel只有一个固定节点的话,设置options的remote_side为这个单节点的remote_side。
   2. (不必要)如果add的channel有多个节点的话,可能需要SocketOptions新增一个string字段初始化用的名字服务地址。
   如果1,2满足的话,就有办法在'ChannelBalancer::Describe'中获取对应的remote_side并输出到os了。
   
   **Describe alternatives you've considered (描述你想到的折衷方案)**
   或者有办法通过subchannel的socketid知道对应的原始channel的socketid也可以。
   例如subchannel的socketid=1,原始channel的socketid=0。如果知道这层关系,则可以通过sockets服务看到对应的remote_side。
   
   **Additional context/screenshots (更多上下文/截图)**
   还是上文提到的例子,subchannel的socketid=1,原始channel的socketid=0。
   这是socketid=1的Socket信息,无法直接拿到remote_side。user中的SubChannel对应的Socket对象才能拿到remote_side。
   `version=0
   nref=2
   nevent=0
   fd=-1
   tos=0
   reset_fd_to_now=34810858us
   remote_side=0.0.0.0:0
   local_side=0.0.0.0:0
   on_et_events=0
   user=(brpc::schan::SubChannel*)0x34dde90
   this_id=1
   preferred_index=-1
   hc_count=0
   avg_input_msg_size=0
   read_buf=0
   last_read_to_now=34810873us
   last_write_to_now=34810873us
   overcrowded=0
   id_wait_list={}
   parsing_context=0
   pipeline_q=0
   hc_interval_s=1
   ninprocess=1
   auth_flag_error=0
   auth_id=4294967297
   auth_context=0
   logoff_flag=0
   recycle_flag=0
   ninflight_app_health_check=0
   agent_socket_id=(none)
   cid=0
   write_head=0
   ssl_state=SSL_OFF`
   


-- 
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


[GitHub] [incubator-brpc] FancyJan closed issue #1668: 希望在ChannelBalancer的Describe方法中有办法获取remote_side信息

Posted by GitBox <gi...@apache.org>.
FancyJan closed issue #1668:
URL: https://github.com/apache/incubator-brpc/issues/1668


   


-- 
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


[GitHub] [incubator-brpc] FancyJan commented on issue #1668: 希望在ChannelBalancer的Describe方法中有办法获取remote_side信息

Posted by GitBox <gi...@apache.org>.
FancyJan commented on issue #1668:
URL: https://github.com/apache/incubator-brpc/issues/1668#issuecomment-1013838350


   找到了别的办法绕过去,close了


-- 
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