Protocol Overview

Protocol Overview

As an RPC framework, Dubbo has an efficient built-in RPC communication protocol that helps solve coding and communication issues between services. The currently supported protocols include:

  • triple, a high-performance communication protocol based on HTTP/1 and HTTP/2, 100% compatible with gRPC, supporting Unary, Streaming, and other communication modes; allows publishing REST-style HTTP services.
  • dubbo, a high-performance private communication protocol based on TCP, with the drawback of lower general applicability, more suitable for use between Dubbo SDKs;
  • Any protocol extension, by extending protocol, any RPC protocol can be supported, with official ecosystem libraries providing support for JsonRPC, thrift, etc.

Protocol Selection

How should developers decide which protocol to use? The following is our comparative analysis of multiple mainstream protocols from aspects like use cases, performance, ease of programming, and multilingual interoperability:

ProtocolPerformanceGateway FriendlyStreamingMultilingual SupportProgramming APIDescription
tripleHighHighSupports client stream, server stream, bidirectional streamSupports (Java, Go, Node.js, JavaScript, Rust)Java Interface, Protobuf(IDL)The most balanced protocol implementation in terms of multilingual compatibility, performance, gateway, Streaming, gRPC, etc., recommended by the official team.
Supports application/json formatted payload for direct HTTP access.
dubboHighLowNot supportedSupports (Java, Go)Java InterfaceThe highest performance private protocol, but has higher costs for frontend traffic access and multilingual support

Here is the specific development, configuration, and runtime information for the two main protocols, triple and dubbo:

Protocol NameConfiguration ValueService Definition MethodsDefault PortTransport Layer ProtocolSerialization ProtocolDefault
tripletri- Java Interface
- Java Interface+SpringWeb Annotation
- Java Interface+JaxRS Annotation
- Protobuf(IDL)
50051HTTP/1, HTTP/2Protobuf Binary, Protobuf-jsonNo
dubbodubbo- Java Interface20880TCPHessian, Fastjson2, JSON, JDK, Avro, Kryo, etc.Yes

Multi-Protocol Extensions

Below are the extension protocol implementations currently provided by the Dubbo official ecosystem. For information on extending more custom protocols, please refer to SPI extension manual or usage tutorial - protocol extension .

ProtocolConfiguration ValueDescription
HessianhessianRPC communication protocol defined by Hessian, see Hessian Protocol for details
Spring HTTPhttpPrivate protocol based on HTTP defined by Spring, see Hessian Protocol for details
Apache ThriftthriftThrift protocol known for its high performance and multilingual support, see Thrift Protocol for details
JsonRPCjsonrpcSee JsonRPC for details
RMIrmiSee RMI Protocol for details
WebServicewebserviceSee WebService Protocol for details