https://github.com/apache/dubbo-go
Go Implementation For Apache Dubbo .
https://github.com/apache/dubbo-go
go http2 microservices rpc service-mesh
Last synced: 12 days ago
JSON representation
Go Implementation For Apache Dubbo .
- Host: GitHub
- URL: https://github.com/apache/dubbo-go
- Owner: apache
- License: apache-2.0
- Created: 2018-08-08T05:30:36.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-04-17T01:29:27.000Z (17 days ago)
- Last Synced: 2025-04-18T17:19:50.269Z (16 days ago)
- Topics: go, http2, microservices, rpc, service-mesh
- Language: Go
- Homepage: https://dubbo.apache.org/
- Size: 91.8 MB
- Stars: 4,781
- Watchers: 159
- Forks: 941
- Open Issues: 77
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- go-awesome - dubbo-go - Dubbo Go version (Open source library / RPC)
- my-awesome - apache/dubbo-go - mesh pushed_at:2025-04 star:4.8k fork:0.9k Go Implementation For Apache Dubbo . (Go)
README
# Apache Dubbo for Golang
[](https://travis-ci.org/apache/dubbo-go)
[](https://codecov.io/gh/apache/dubbo-go)
[](https://pkg.go.dev/github.com/apache/dubbo-go?tab=doc)
[](https://goreportcard.com/report/github.com/apache/dubbo-go)
---
Apache Dubbo is an easy-to-use Web and RPC framework that provides multiple
language implementations(Go, [Java](https://github.com/apache/dubbo), [Rust](https://github.com/apache/dubbo-rust), [Node.js](https://github.com/apache/dubbo-js), [Web](https://github.com/apache/dubbo-js)) for communication, service discovery, traffic management,
observability, security, tools, and best practices for building enterprise-ready microservices.Dubbo-go is the Go implementation of [triple protocol](https://dubbo.apache.org/zh-cn/overview/reference/protocols/triple-spec/)(a fully gRPC compatible and HTTP-friendly protocol) and the various features for building microservice architecture designed by Dubbo.
Visit [the official website](https://dubbo.apache.org/) for more information.
## Getting started
You can learn how to develop a dubbo-go RPC application step by step in 5 minutes by following our [Quick Start](https://github.com/apache/dubbo-go-samples/tree/main/helloworld) 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.
```go
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:
```shell
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:
```go
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](https://github.com/apache/dubbo-go-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

- **RPC Protocols**: Triple, gRPC compatible and HTTP-friendly
- **Service Discovery**: Nacos, Zookeeper, Etcd, Polaris-mesh, Consul.
- **Load Balance**: Adaptive, Random, RoundRobin, LeastActive, ConsistentHash
- **Traffic Management**: traffic split, timeout, rate limiting, canary release
- **Configuration**: yaml file, dynamic configuration(Nacos, Zookeeper, etc.).
- **Observability**: metrics(Prometheus, Grafana) and tracing(Jaeger, Zipkin).
- **HA Strategy**: Failover, Failfast, Failsafe/Failback, Available, Broadcast, Forking## Ecosystem
- [Console](https://github.com/apache/dubbo-kubernetes), under development
- [Samples](https://github.com/apache/dubbo-go-samples)
- [Interoperability with Dubbo Java](https://dubbo-next.staged.apache.org/zh-cn/overview/mannual/golang-sdk/tutorial/interop-dubbo/)
- [Protoc-gen-go-triple](https://github.com/dubbogo/protoc-gen-go-triple/)## Contributing
Please visit [CONTRIBUTING](./CONTRIBUTING.md) for details on submitting patches and the contribution workflow.
## Contact
Join our discussion group through Ding talk, WeChat, or Discord.
discord https://discord.gg/C5ywvytg
## [User List](https://github.com/apache/dubbo-go/issues/2)
If you are using [apache/dubbo-go](https://github.com/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](https://github.com/apache/dubbo-go/issues/2) to let us know your needs.
[See more user cases](https://github.com/apache/dubbo-go/issues/2)
## License
Apache Dubbo-go software is licensed under the Apache License Version 2.0. See the LICENSE file for details.