Cloud Native 12 min read

Why Dubbo’s New Triple Protocol Beats gRPC for Cloud‑Native Microservices

The article explains how Dubbo 3’s upgraded Triple protocol, fully compatible with gRPC and runnable over HTTP/1 and HTTP/2, simplifies client and server integration, reduces development and operational costs, and offers multi‑language support, making it a practical choice for cloud‑native microservice architectures.

Alibaba Cloud Native
Alibaba Cloud Native
Alibaba Cloud Native
Why Dubbo’s New Triple Protocol Beats gRPC for Cloud‑Native Microservices

Overview

Dubbo 3 introduces the Triple protocol, an HTTP‑based RPC specification that is fully compatible with gRPC. It supports request‑response and streaming models and can run on both HTTP/1 and HTTP/2.

Design Goals

Expose Dubbo services to standard HTTP clients (cURL, browsers, mobile apps) without additional gateway conversion.

Maintain seamless interoperability with existing gRPC services.

Allow a single server port to serve gRPC, Triple, and plain HTTP traffic distinguished by Content‑Type.

Supported Content‑Types

Calling a standard gRPC server: application/grpc, application/grpc+proto, application/grpc+json.

Calling a Dubbo server via Triple: application/json, application/proto, application/triple+wrapper.

Invocation Example

Triple services can be invoked with any HTTP tool. Example using curl:

curl \
    --header "Content-Type: application/json" \
    --data '{"sentence": "Hello Dubbo."}' \
    https://host:port/org.apache.dubbo.sample.GreetService/sayHello

Comparison with gRPC

gRPC requires extra proxy components (grpc‑web, grpc‑gateway) for browser access.

gRPC forces Protocol Buffers IDL, adding overhead for projects with limited multi‑language needs.

Debugging gRPC often needs specialized tools; Triple can be debugged with standard HTTP tools.

gRPC implementations exceed 100 k lines of code, whereas Triple’s implementation is only a few thousand lines, simplifying maintenance.

Multi‑Language Implementations

Java – supports both IDL‑based and Java‑interface definitions; performance comparable to grpc‑java. Repository: https://github.com/apache/dubbo

Go – uses the official Go HTTP library; stub generation via Dubbo’s protoc plugin. Repository: https://github.com/apache/dubbo-go/

Rust – implements the gRPC‑compatible parts and is adding unary HTTP/1 support. Repository: https://github.com/apache/dubbo-rust/

Node.js – full gRPC compatibility with ongoing HTTP/1 support. Repository: https://github.com/apache/dubbo-js/

Web (JavaScript) – client library enables direct browser calls to Dubbo services. Repository: https://github.com/apache/dubbo-js/

Version and Sample

Dubbo Java 3.3.0‑triple‑SNAPSHOT includes the upgraded Triple protocol. A runnable example is available at samples/dubbo-samples-triple-unary in the Dubbo repository.

Specification and Interoperability

Full protocol definition: https://cn.dubbo.apache.org/zh-cn/overview/reference/protocols/triple-spec/

Interoperability sample (gRPC ↔ Triple): https://github.com/apache/dubbo-samples/tree/triple-protocol-sample-0719/2-advanced/dubbo-samples-triple-grpc

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

cloud nativegRPCtriple-protocol
Alibaba Cloud Native
Written by

Alibaba Cloud Native

We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.