Why Rewrite Dubbo in Go? Business and Technical Reasons Behind Dubbo‑Go

This article examines the motivations for rewriting the Java‑centric Dubbo RPC framework in Go, discussing language efficiency, company‑level technology choices, the advantages of Go’s lightweight concurrency for gateways, and how Dubbo‑Go bridges Java and Go in modern microservice and service‑mesh architectures.

macrozheng
macrozheng
macrozheng
Why Rewrite Dubbo in Go? Business and Technical Reasons Behind Dubbo‑Go

Introduction

I often ponder technical "why" questions during walks, and when I finally convince myself of every point, I write them down as articles. This series explores overlooked issues and deeper reasons behind technology choices, without necessarily showing code.

Dubbo, an open‑source RPC framework from Alibaba launched in 2011, was rewritten in Go in 2019. The project has progressed from V1.0.0 to V3.0.0 and currently has about 3.8K stars.

Connecting Past and Future

Dubbo‑Go’s purpose, as described on its GitHub page, is to bridge Java and Golang, enabling interoperability with the gRPC/Dubbo ecosystem and letting the Java world benefit from cloud‑native advances.

Apache Dubbo Go implementation builds a bridge between Java and Golang, interconnecting with the gRPC/Duboo ecosystem and bringing cloud‑native benefits to the Java community.

In simple terms, Dubbo‑Go allows Java‑based services and Go‑based services to communicate.

Choosing a Programming Language

In commercial companies, the primary factor in language selection is efficiency —both development and runtime—because profit depends on minimizing cost while delivering equal value.

Development efficiency: faster delivery reduces labor costs.

Runtime efficiency: lower server costs.

Alibaba’s evolution illustrates this trade‑off: early use of PHP for rapid development gave way to Java when performance demands grew, and newer companies adopt Go for its high performance and simplicity.

Both Java and Go are reasonable choices; each offers distinct advantages such as Java’s rich ecosystem and Go’s fast startup, low memory footprint, and lightweight concurrency.

Dubbo’s Dominance in RPC Frameworks

When monolithic applications outgrow their limits, companies adopt microservices and need a robust RPC framework. Dubbo, open‑sourced in 2011, was one of the earliest Java RPC solutions, predating Spring Cloud (2014), Motan (2017), gRPC (2015), and Thrift (2007).

Unlike Thrift, Dubbo provides out‑of‑the‑box service governance features like registration, discovery, load balancing, fault tolerance, and dynamic configuration.

RPC framework timeline
RPC framework timeline

Even in a crowded RPC landscape, Dubbo retains a strong position thanks to extensive adoption and Alibaba’s backing.

Bridging Java and Go with Dubbo‑Go

When a company using Java and Dubbo wants to experiment with Go, they face the challenge of making Java‑based Dubbo communicate with Go services. Because Dubbo’s protocol is private, re‑implementing it in Go is non‑trivial, which is why Dubbo‑Go was created.

Thread‑Pool Challenges in Dubbo Gateways

Dubbo gateways often require a thread per request, leading to limited concurrency and thread‑pool saturation. Solutions include isolating thread pools or switching to asynchronous calls, but the latter adds complexity.

Go’s lightweight goroutines solve this problem elegantly, offering high‑performance gateways with simple code.

For example, Nginx’s performance is well known, yet implementing comparable performance in Java would demand many machines, whereas Baidu’s BFE, written in Go, demonstrates Go’s capability.

Dubbo‑Go Gateway Example

The open‑source project Dubbo-go-pixiu provides a Go‑based Dubbo gateway used in production.

Preparing for Dubbo Mesh

Service Mesh is emerging as the next‑generation microservice architecture, and Go is a natural fit for Mesh implementations due to its performance and concurrency model. Dubbo‑Go lays the groundwork for a Dubbo‑based Mesh, though full solutions are not yet open‑sourced.

Conclusion

Dubbo‑Go exists to bridge Java and Golang, enabling seamless communication between services written in these languages. The diagram below illustrates this bridge.

Java‑Go bridge diagram
Java‑Go bridge diagram
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.

RPCGoDubboService Mesh
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

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.