The Dubbo framework provides a custom high-performance RPC communication protocol: the Triple protocol based on HTTP/2 and the Dubbo2 protocol based on TCP. In addition, the Dubbo framework supports any third-party communication protocol, such as the officially supported gRPC, Thrift, REST, JsonRPC, Hessian2, etc. More protocols can be implemented through custom extensions. This is very useful for multi-protocol communication scenarios often encountered in microservice practices.
The Dubbo framework does not bind to any communication protocol. In implementation, Dubbo’s support for multiple protocols is very flexible. It allows you to publish multiple services using different protocols within one application and supports publishing all protocols externally using the same port.
With Dubbo framework’s multi-protocol support, you can:
The Triple protocol is a communication protocol released by Dubbo3 for the cloud-native era. It is based on HTTP/2 and fully compatible with the gRPC protocol, natively supporting Streaming communication semantics. Triple can run on both HTTP/1 and HTTP/2 transport protocols, allowing you to directly use curl and browsers to access backend Dubbo services.
Starting from the Triple protocol, Dubbo also supports service definition and data transmission based on Protocol Buffers, but the Triple implementation is not bound to IDL. For example, you can directly use Java Interface to define and publish Triple services. Triple has better gateway and proxy penetration, making it very suitable for deployment architectures involving cross-gateway and proxy communication, such as service meshes.
The core features of the Triple protocol are as follows:
In terms of programming and communication models, the Triple protocol supports the following modes:
Development Practices
The Dubbo2 protocol is an RPC communication protocol built on top of the TCP transport layer protocol. Due to its compact, flexible, and high-performance characteristics, it has been widely used in the Dubbo2 era and is a key communication solution for building high-performance, large-scale microservice clusters in enterprises. In the cloud-native era, we recommend using the more general and penetrative Triple protocol.
The Dubbo2 protocol also has built-in HTTP support, so you can use curl to quickly verify or debug services during the development phase.
You can develop and manage microservices with Dubbo, then set up gRPC protocol for underlying communication. But why do this? What are the advantages compared to using the gRPC framework directly? The simple answer is that this is a common pattern for microservice development using gRPC. Read on for more details.
gRPC is an open-source communication protocol based on HTTP/2 by Google. As mentioned in our Product Comparison document, gRPC is positioned as a communication protocol and implementation, a purely RPC framework, while Dubbo is positioned as a microservice framework providing solutions for microservice practices. Therefore, compared to Dubbo, gRPC relatively lacks abstractions for microservice programming models and service governance.
Using the gRPC protocol within the Dubbo framework (gRPC over Dubbo Framework) is a highly efficient and lightweight choice. It allows you to use the native gRPC protocol for communication while avoiding the complexity of secondary customization and development based on gRPC (secondary development and customization of gRPC is an unavoidable step confirmed by many enterprises after large-scale practice. The Dubbo framework completes this step for developers, allowing them to use gRPC in the simplest way).
A common communication pattern in the microservice field is HTTP + JSON. Some mainstream microservice frameworks like Spring Cloud and Microprofile default to this communication pattern. Dubbo also provides support for HTTP-based programming and communication patterns.
In addition to the protocols introduced above, you can also run the following protocols on top of Dubbo. For Dubbo, you only need to change a simple configuration line to switch the underlying service communication protocol, without affecting other peripheral APIs and governance capabilities.
For the configuration and usage methods of the above protocols, including how to configure single-port multi-protocol
support, please refer to the following SDK example documents:
In addition to the communication protocols supported by the official version above, Dubbo supports extending new protocol support. For details, please refer to Tasks - Extensibility - Protocol