Dubbo Triple Protocol: Design, Features, Compatibility, and Multi‑Language Implementations
The article introduces Dubbo's upgraded Triple protocol—a HTTP‑based, gRPC‑compatible RPC protocol that supports both HTTP/1 and HTTP/2, streaming, and easy front‑end access, explains its design goals versus gRPC, showcases usage examples, and details multi‑language implementations and production adoption.
As microservice architectures evolve, many applications are migrating from Dubbo2's binary TCP protocol to Dubbo3's Triple protocol, which is fully compatible with gRPC and leverages an efficient full‑duplex streaming model. Triple can run over both HTTP/1 and HTTP/2, reducing gateway conversion costs for front‑end devices.
Triple is an HTTP‑based RPC specification designed by Dubbo3. It supports Request‑Response and streaming communication models, works with standard HTTP tools such as curl, and allows browsers, mobile clients, and other HTTP‑capable devices to call Dubbo services directly.
When Dubbo acts as a client, it can invoke both Triple‑based Dubbo services and standard gRPC services by setting appropriate Content‑Type headers (e.g., application/grpc for gRPC and application/json or application/triple+wrapper for Triple). When Dubbo acts as a server, it simultaneously supports ordinary HTTP, gRPC, and Triple protocols on the same port, handling requests based on the Content‑Type header.
Key design motivations for Triple include:
Providing a protocol that combines the compatibility of gRPC with the simplicity of HTTP, eliminating the need for extra proxies like grpc‑web.
Offering a lighter‑weight implementation that avoids the complexity of gRPC’s large codebase and IDL‑centric workflow, while still supporting Protocol Buffers.
Enabling easier debugging with standard tools (curl, Chrome devtools) and comparable or better performance than grpc‑java.
Dubbo’s Triple implementation is deliberately minimal, delegating network handling to proven libraries (Netty for Java, Go’s standard HTTP library, etc.). This results in a small code footprint and straightforward maintenance.
Since its introduction, Triple has been deployed at large scale within Alibaba and many community enterprises, proving its reliability, simplicity, and ease of integration with Dubbo’s service governance features (service discovery, load balancing, traffic control).
Multi‑language support is a core goal. Implementations are available for Java (including interface‑based service definitions), Go, Rust, Node.js, and Web (JavaScript). Each language provides a stub generation workflow (e.g., Dubbo’s protoc plugin for Go) and can be accessed via standard HTTP tools.
Example cURL invocation:
curl \
--header "Content-Type: application/json" \
--data '{"sentence": "Hello Dubbo."}' \
https://host:port/org.apache.dubbo.sample.GreetService/sayHelloRepository links for the various implementations are provided (e.g., https://github.com/apache/dubbo, https://github.com/apache/dubbo-go/, https://github.com/apache/dubbo-rust/, https://github.com/apache/dubbo-js/). The article concludes with an invitation to join the Apache Dubbo community for ongoing updates.
High Availability Architecture
Official account for High Availability Architecture.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
