baidu_rpc_logo

What is RPC?

RPC abstracts the network communications as "clients access functions on servers": client sends a request to server, and wait until server receives -> processes -> responds the request, then do actions according to the result. RPC satisfies most network communication requirements as well as encapsulates the underlying details.

What is baidu-rpc?

A RPC framework used throughout Baidu, with more than 600,000 instances. You can use it for:

  • Build a server that can talk in multiple protocols (on same port), including:
    • http/https, h2/h2c (compatible with grpc, will be opensourced soon)
    • hadoop_rpc(not opensourced yet)
    • rtmp/flv/hls, for building live-streaming services.
    • all sorts of protocols based on protobuf used in Baidu: baidu_std, hulu_pbrpc, sofa_pbrpc, nova_pbrpc, public_pbrpc, ubrpc, and nshead-based ones.
  • Access services in an unified way, including:
    • http (much more friendly than libcurl), h2/h2c (compatible with grpc, will be opensourced soon)
    • redis and memcached, thread-safe and more friendly and performant than the official clients
    • rtmp/flv, for building live-streaming services.
    • all sorts of protocols based on protobuf used in Baidu.
  • Debug services via http, and run online profilers.
  • Get better latency and throughput.

Check out Getting Started or 开始使用 for more information.