Why Rewrite Dubbo in Go? Exploring the Business and Technical Drivers
This article examines the motivations behind rewriting the popular Java RPC framework Dubbo in Go, discussing language efficiency, micro‑service architecture, RPC competition, thread‑pool challenges, and the emerging role of Dubbo‑Go in service‑mesh environments.
Opening Thoughts
I often ponder technical "why" questions during walks; when I finally convince myself of every point, I consider the thought process worth sharing as a new article series. These pieces may not contain code, but they reveal often‑overlooked issues and deeper reasons.
Connecting Past and Future
Dubbo, open‑sourced by Alibaba in 2011, has evolved from version V1.0.0 to V3.0.0 with over 3.8K stars. In 2019 it was rewritten in Go and open‑sourced as Dubbo‑Go.
Dubbo‑Go’s official description (translated) is: "Apache Dubbo Go implementation bridges Java and Golang, interoperates with gRPC/Dubbo ecosystems, and lets the Java ecosystem enjoy cloud‑native benefits." In plain terms, it enables Java‑based Dubbo services to communicate with Go services.
Choosing a Programming Language
For commercial companies, the primary consideration is efficiency , encompassing both development speed and runtime performance, because profit depends on delivering features at the lowest cost.
Development efficiency accelerates product launch and reduces labor costs.
Runtime efficiency lowers server expenses.
Alibaba’s own evolution illustrates this trade‑off: early use of PHP for rapid development, later switching to Java for higher performance, and newer firms adopting Go for its fast start‑up, low memory footprint, and excellent concurrency support.
Summary
Both Java and Go are reasonable choices; a company may adopt both when it needs Java‑based services and wants to leverage Go’s lightweight concurrency for new components.
Dubbo’s Edge in the RPC Landscape
When monolithic applications outgrow their limits, companies adopt micro‑services and need a robust RPC framework. Dubbo, open‑sourced in 2011, predates competitors like Spring Cloud (2014), Motan (2017), gRPC (2015), and Thrift (2007). Unlike Thrift, Dubbo offers built‑in service governance such as registration, discovery, load balancing, fault tolerance, and dynamic configuration.
Even in today’s diverse RPC ecosystem, Dubbo retains a strong position thanks to widespread adoption and Alibaba’s backing.
Thread‑Pool Challenges and Go’s Advantage
Dubbo gateways often suffer from thread‑pool saturation because each synchronous request occupies a Java thread, limiting concurrency. Solutions include isolating thread pools or switching to asynchronous calls, but the latter adds considerable complexity.
Go’s lightweight goroutines and efficient scheduler solve this problem elegantly, enabling high‑performance gateways with far less code.
For a concrete example, Baidu replaced Nginx with the Go‑based BFE reverse proxy, demonstrating Go’s superior performance.
Dubbo‑Go in Practice
The open‑source project Dubbo-go-pixiu provides a Go‑based Dubbo gateway that is already used in production.
Preparing for Dubbo Mesh
Service Mesh is emerging as the next‑generation micro‑service architecture, and Go’s dominance in cloud‑native tooling (K8s, Docker) and its rapid development cycle make it the language of choice for Mesh implementations. Dubbo‑Go paves the way for a Dubbo‑based Mesh, though a full open‑source solution is not yet available.
Conclusion
In short, Dubbo was rewritten in Go to bridge Java and Golang, enabling seamless communication across language boundaries and leveraging Go’s efficiency for modern cloud‑native scenarios.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Xiao Lou's Tech Notes
Backend technology sharing, architecture design, performance optimization, source code reading, troubleshooting, and pitfall practices
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.
