랭킹으로 돌아가기

apache/dubbo-go

Godubbo.apache.org

Go Implementation For Apache Dubbo .

gohttp2microservicesrpcservice-mesh
스타 성장
스타
4.9k
포크
1k
주간 성장
이슈
43
2k4k
2018년 8월2021년 3월2023년 11월2026년 7월
아티팩트Go Modulesgo get github.com/apache/dubbo-go
README

Apache Dubbo for Golang

CI go.dev reference Go Report Card license


English | 中文

Apache Dubbo-go is a high-performance RPC and microservice framework compatible with other Dubbo language implementations. It leverages Golang's concurrency features to provide efficient service governance, including service discovery, load balancing, and traffic management. Dubbo-go supports multiple protocols, such as Dubbo, JSONRPC, Triple(gRPC-compatible), gRPC, HTTP, HTTP2, and HTTP/3 (experimental), ensuring seamless integration in heterogeneous environments.

You can visit the official website for more information.

Recent Updates

For detailed changes, refer to CHANGELOG.md.

  • 3.3.1: Optimized configuration hot-reloading with content-based caching to prevent redundant notifications. Added experimental HTTP/3 support, Apollo integration, and Triple protocol OpenAPI generation. Fixed critical race conditions in service discovery under high-concurrency.

  • 3.3.0: Introduced script routing, multi-destination conditional routing, Triple protocol keepalive and connection pooling, Nacos multi-category subscriptions, and enhancements for observability and interoperability.

Getting started

Prerequisites

  • Go 1.24 or later (recommended for compatibility with recent updates).

Installation

To install Dubbo-go, use the following command:

go get dubbo.apache.org/dubbo-go/v3@latest

Quick Example

You can learn how to develop a dubbo-go RPC application step by step in 5 minutes by following our Quick Start demo.

It's as simple as the code shown below, you define a service with Protobuf, provide your own service implementation, register it to a server, and start the server.

func (srv *GreetTripleServer) Greet(ctx context.Context, req *greet.GreetRequest) (*greet.GreetResponse, error) {
	resp := &greet.GreetResponse{Greeting: req.Name}
	return resp, nil
}

func main() {
	srv, _ := server.NewServer(
		server.WithServerProtocol(
			protocol.WithPort(20000),
			protocol.WithTriple(),
		),
	)

	_ := greet.RegisterGreetServiceHandler(srv, &GreetTripleServer{})

	if err := srv.Serve(); err != nil {
		logger.Error(err)
	}
}

After the server is up and running, call your service via cURL:

curl \
    --header "Content-Type: application/json" \
    --data '{"name": "Dubbo"}' \
    http://localhost:20000/greet.GreetService/Greet

Or, you can start a standard dubbo-go client to call the service:

func main() {
	cli, _ := client.NewClient(
		client.WithClientURL("127.0.0.1:20000"),
	)

	svc, _ := greet.NewGreetService(cli)

	resp, _ := svc.Greet(context.Background(), &greet.GreetRequest{Name: "hello world"})
	
	logger.Infof("Greet response: %s", resp.Greeting)
}

See the samples for detailed information on usage. Next, learn how to deploy, monitor and manage the traffic of your dubbo-go application by visiting the official website.

Features

dubbo-go-architecture

Dubbo-go provides robust service governance capabilities:

  • RPC Protocols: Triple, gRPC compatible and HTTP-friendly
  • Service Discovery: Nacos, Zookeeper, Etcd, Polaris-mesh.
  • Load Balance: Adaptive, Random, RoundRobin, LeastActive, ConsistentHash
  • Traffic Management: traffic split, timeout, rate limiting, canary release
  • Configuration: yaml file, dynamic configuration(Nacos, Apollo, Zookeeper, etc.).
  • Observability: Metrics (Prometheus), tracing (OpenTelemetry v1.21.0+ with insecure options and standardized span names), logging (with service registration lifecycle events).
  • HA Strategy: Failover, Failfast, Failsafe/Failback, Available, Broadcast, Forking.
  • Interoperability: Full compatibility with Apache Dubbo (Java) via Triple protocol generic calls, group/version wildcard matching, and TLS API redesign.

️ Tools

The tools/ directory and the dubbogo/tools repository provide several utilities to streamline your Dubbo-Go development experience.

dubbo-go-schema

A tool that provides JSON Schema for Dubbo-Go configuration files, enabling editor assistance such as completion, hints, and validation.

For usage details, see the dubbo-go-schema README.

dubbogo-cli

A command-line tool for bootstrapping, managing, and debugging Dubbo-Go applications.

protoc-gen-go-triple

A protoc plugin that generates Go client and server code for the Triple protocol from .proto definition files.

Note: This tool replaces the deprecated protoc-gen-dubbo3grpc and deprecated protoc-gen-go-triple.

For usage details, see the protoc-gen-go-triple README.

imports-formatter

A formatting tool for Dubbo-Go developers that organizes Go import blocks according to the community style guide.

For usage details, see the imports-formatter README.

variadicrpccheck

A warning-only scanner that detects exported variadic RPC contracts and prints migration guidance for cross-language scenarios.

Run make rpc-contract-check to use it locally.

Ecosystem

Documentation

Community

Contributions, issues, and discussions are welcome. Please visit CONTRIBUTING for details on submitting patches and the contribution workflow.

Contact

Join our discussion group through Ding talk or WeChat.

invite.png

User List

If you are using apache/dubbo-go and think that it helps you or want to contribute code for Dubbo-go, please add your company to the user list to let us know your needs.

See more user cases

License

Apache Dubbo-go software is licensed under the Apache License Version 2.0. See the LICENSE file for details.

관련 저장소
avelino/awesome-go

A curated list of awesome Go frameworks, libraries and software

GoGo ModulesMIT Licensegolanggolang-library
awesome-go.com
178.8k13.4k
ollama/ollama

Get up and running with Kimi-K2.6, GLM-5.2, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

GoGo ModulesMIT Licensellamallm
ollama.com
176.6k17.1k
golang/go

The Go programming language

GoGo ModulesBSD 3-Clause "New" or "Revised" Licenseprogramming-languagelanguage
go.dev
135.3k19.3k
kubernetes/kubernetes

Production-Grade Container Scheduling and Management

GoGo ModulesApache License 2.0kubernetesgo
kubernetes.io
123.9k43.7k
fatedier/frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.

GoGo ModulesApache License 2.0proxyreverse-proxy
108.2k15.1k
gohugoio/hugo

The world’s fastest framework for building websites.

GoGo ModulesApache License 2.0gohugo
gohugo.io
89k8.3k
gin-gonic/gin

Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performance—up to 40 times faster—thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices.

GoGo ModulesMIT Licenseservermiddleware
gin-gonic.com
88.9k8.7k
syncthing/syncthing

Open Source Continuous File Synchronization

GoGo ModulesMozilla Public License 2.0synchronizationgo
syncthing.net
86.8k5.4k
junegunn/fzf

:cherry_blossom: A command-line fuzzy finder

GoGo ModulesMIT Licensefzfgo
junegunn.github.io/fzf/
81.9k2.8k
grafana/grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

TypeScriptnpmGNU Affero General Public License v3.0grafanamonitoring
grafana.com
75.7k14.3k
caddyserver/caddy

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

GoGo ModulesApache License 2.0goweb-server
caddyserver.com
74.2k4.8k
moby/moby

The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

GoGo ModulesApache License 2.0dockercontainers
mobyproject.org
71.9k19k