brpc-service
作者:互联网
ServerOptions:
idle_timeout_sec,多久未传输断链
num_threads,默认cpu核数,没有Io/worker thread,brpc自动调度io/worker达到更好的并发和减少上下文切换;
max_concurrency,默认0,如果服务器达到限制,则直接用ELIMIT响应客户端,而不调用服务的回调。
session_local_data_factory,//session-local data is attached to current RPC and invalid after calling `done'
reserved_session_local_data
ChannelOptions:
connect_timeout_ms
timeout_ms
backup_request_ms
max_retry
retry_policy
connection_group
看下客户端:
基类ChannelBase继承于google::protobuf::RpcChannel
负载均衡:
算法基本就是轮询,权重轮询,随机,延迟低到高,一致性哈希;
支持策略:bns,file,list,dns
结构图:
标签:brpc,timeout,service,local,session,ms,data 来源: https://blog.csdn.net/nawenqiang/article/details/118356270