wwbmmm commented on issue #2143: URL: https://github.com/apache/brpc/issues/2143#issuecomment-1452908777
> 如下例子,当Channel和Controller是service回调函数的栈变量,且ns需要通过rpc获取节点信息时 感觉这个使用场景不是很合理,如果Channel是service回调函数的栈变量,那么每处理一个请求都需要创建/销毁一次Channel,而且这个过程中还会查询ns,而ns还需要rpc来获取节点信息,这样每次请求都要查一次ns,很低效。 通常来说如果每次请求动态创建Channel,一般Channel都是比较轻量的,比如SingleServer模式,或者list ns。对于比较重的ns最好还是做成全局一个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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
