apache /brpc
brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc. "brpc" means "better RPC".
★ 17,643⑂ 4,154👁 776⑃ 1,714● 2,012▤ 27
-1
日增长
17,643
stars
4,154
forks
776
watchers
1,714
prs
2,012
issues
27
releases
README
中文版
!brpc logo (light)
!brpc logo (dark)
bRPC is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc.
"bRPC" means "better RPC".
You can use it to:
Build a server that can talk in multiple protocols (on same port), or access all sorts of services:
restful http/https, h2/gRPC. using http/h2 in bRPC is much more friendly than libcurl. Access protobuf-based protocols with HTTP/h2+json, probably from another language.
redis and memcached, thread-safe, more friendly and performant than the official clients.
rtmp/flv/hls, for building streaming services.
hadoop_rpc (may be opensourced).
rdma support.
thrift support, thread-safe, more friendly and performant than the official clients.
all sorts of protocols used in Baidu: baidu_std, streaming_rpc, hulu_pbrpc, sofa_pbrpc, nova_pbrpc, public_pbrpc, ubrpc and nshead-based ones.
Build HA distributed services using an industrial-grade implementation of RAFT consensus algorithm which is opensourced at braft.
Servers can handle requests synchronously or asynchronously.
Clients can access servers synchronously, asynchronously, semi-synchronously, or use combo channels to simplify sharded or parallel accesses declaratively.
Debug services via http, and run cpu, heap and contention profilers.
Get better latency and throughput.
Extend bRPC with the protocols used in your organization quickly, or customize components, including naming services (dns, zk, etcd), load balancers (rr, random, consistent hashing).
Try it!
Read overview to know where bRPC can be used and its advantages.
Read getting started for building steps and play with examples.
Docs:
Enable FlatBuffers RPC and verify the example
Performance benchmark
bvar
bvar_c++
bthread
bthread or not
thread-local
Execution Queue
bthread tracer
bthread tagged task group
Client
Basics
Error code
Combo channels
Access http/h2
Access gRPC
Access thrift
Access UB
Streaming RPC
Access redis
Access memcached
Backup request
Dummy server
Server
Basics
Serve http/h2
Serve gRPC
Serve thrift
Serve Nshead
Debug server issues
Server push
Avalanche
Auto ConcurrencyLimiter
Media Server
json2pb
Builtin Services
status
vars
connections
flags
rpcz
cpu_profiler
heap_profiler
contention_profiler
Tools
rpc_press
rpc_replay
rpc_view
benchmark_http
parallel_http
Others
IOBuf
Streaming Log
FlatMap
Coroutine
Circuit Breaker
UBRing
RDMA
Bazel Support
Wireshark baidu_std dissector plugin
bRPC introduction(training material)
A tutorial on building large-scale services(training material)
bRPC internal(training material)
RPC in dTop issues
#2146brpc故障恢复bug28 comments · 2023-03-03#3102brpc支持GPU Direct RDMA26 comments · 2025-09-22#2849bthread signal & wait 问题咨询25 comments · 2024-12-13#2000brpc单个请求延时较高25 comments · 2022-11-17#1662brpc是否考虑自身提供无损热升级能力?24 comments · 2022-01-05#2356centos7编译brpc报错23 comments · 2023-08-11#2120IOBuf是否能支持连续的内存避免内存拷贝21 comments · 2023-02-10#2045是否可以加个redis集群client的example, 试了各种参数都没成功18 comments · 2022-12-08
Discussions
#3719Proposal: workflow labels to move PRs/MRs forward1 comments · 2026-11-07#3711Proposal: URMA runtime recovery and business QoS configuration0 comments · 2026-11-05#3636Discussion: Incrementally improving Server TLS cleanup and lifecycle boundaries3 comments · 2026-10-21#3519Proposal: clarify codec/serialization module boundaries under src/1 comments · 2026-09-04#3432RDMA、URMA 与 UBSHM 公共握手组件设计方案讨论3 comments · 2026-08-10#3411Proposal: raise minimum C++ standard from C++11 to C++141 comments · 2026-07-27#3378EventDispatcher 会自动 stop、join,为什么 brpc worker 不会自动 stop、join 呢?2 comments · 2026-07-09#3327bthread_worker_count超过k8s limit限制1 comments · 2026-06-02
Latest release
Apache bRPC 1.18.0 1.18.0 2026-09-17Apache bRPC 1.18.0 broadens protocol coverage and platform support, and significantly hardens parsers and transport internals. Features - Add MySQL client protocol with clean-room auth, text protocol, transactions and prepared statements by @rajvarun77 (3330) - Support TLSv1.3 by @neilxxxxx (3319) - Support Protobuf v35 by @wasphin (3429) - Support flow-controlled gRPC client requests by @wasphin (3430) - Add TLS peer name verification for clients by @wwbmmm (3408) - Support checksumming the attachment together with the body by @yanglimingcn (3407) - Support RDMA handshake protoco