Cloud Native 9 min read

From Intern to Contributor: Building Dubbo-go 3.0’s Triple Protocol in the Cloud‑Native Era

A former intern recounts three internships across Beijing, Shenzhen, and Hangzhou, detailing how he joined the dubbogo community, implemented the Triple protocol for dubbo-go 3.0 by hand‑crafting HTTP/2, tackled compatibility challenges, and reflected on the future of cloud‑native middleware.

Alibaba Cloud Native
Alibaba Cloud Native
Alibaba Cloud Native
From Intern to Contributor: Building Dubbo-go 3.0’s Triple Protocol in the Cloud‑Native Era

Background

During a three‑month internship in Alibaba's middleware team, the author contributed to dubbo-go 3.0, focusing on the implementation of the Triple protocol and new routing rules.

Triple Protocol Overview

Triple is an extension of gRPC that adds Dubbo’s service‑governance features while preserving gRPC’s unary, streaming and status‑code semantics. It is built on top of HTTP/2.

Implementation Challenges

Custom HTTP/2 stack – A minimal HTTP/2 implementation was written using only the data‑frame SDK. The work covered correct frame emission, flow‑control, window management, stream lifecycle and packet reassembly. After two weeks the basic call path was functional, but stability and performance were insufficient.

Extending the Go standard HTTP/2 library – The official golang.org/x/net/http2 package lacked hooks for custom headers, trailers and stream handling required by Dubbo. An issue was filed, the library was forked, and missing extension points (e.g., header injection, trailer callbacks) were added. The fork was then integrated into dubbo-go.

Network library substitution and performance tuning – By swapping the underlying transport (e.g., using a high‑performance event‑driven I/O library) the team achieved smooth handling of multi‑megabyte bidirectional streams. Single‑node benchmarks with 2–3 MiB payloads reached approximately 1.5 k QPS.

Key Code Snippet

// Example of registering a Triple server
import (
    "dubbo.apache.org/dubbo-go/v3/config"
    "dubbo.apache.org/dubbo-go/v3/protocol/triple"
)

func main() {
    cfg := config.NewConfig()
    cfg.Protocol = "tri"
    cfg.Port = 20000
    triple.StartServer(cfg)
}

Lessons Learned

Hand‑crafted HTTP/2 code proved less reliable and slower than the upstream library, confirming that leveraging well‑maintained upstream components is preferable. The experience highlighted the need to be able to extend upstream code when required and to test flow‑control and stream edge cases thoroughly.

Future Directions

Dubbo-go 3.0, including the Triple protocol, is slated for release. Ongoing work includes deeper integration with sidecar architectures, improving Java‑Go interoperability, and exploring next‑generation RPC models for cloud‑native environments.

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-nativeMiddlewaretriple-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.