Skip to content

apache/dubbo-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 22, 2025
012a247 · Mar 22, 2025
Dec 3, 2024
Mar 16, 2025
Oct 29, 2024
Dec 15, 2024
Mar 7, 2025
Jul 6, 2024
May 16, 2024
Jul 6, 2024
Dec 17, 2024
Dec 15, 2024
Dec 15, 2024
Jan 14, 2024
Nov 17, 2024
Dec 24, 2024
Dec 22, 2024
Apr 23, 2024
Mar 22, 2025
Dec 15, 2024
Mar 16, 2025
Mar 1, 2025
Dec 15, 2024
Mar 21, 2025
Mar 16, 2025
Feb 24, 2023
Dec 15, 2024
Mar 27, 2021
Jan 4, 2021
Mar 22, 2025
Apr 7, 2023
Nov 21, 2023
Aug 8, 2024
Jan 2, 2024
May 16, 2024
Dec 15, 2024
Nov 18, 2023
Dec 15, 2024
Feb 29, 2024
Mar 10, 2025
Mar 10, 2025
Oct 28, 2023
Jul 6, 2024
Dec 15, 2024

Apache Dubbo for Golang

Build Status codecov go.dev reference Go Report Card license


Apache Dubbo is an easy-to-use Web and RPC framework that provides multiple language implementations(Go, Java, Rust, Node.js, Web) 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(a fully gRPC compatible and HTTP-friendly protocol) and the various features for building microservice architecture designed by Dubbo.

Visit the official website 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 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

  • 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

Contributing

Please visit CONTRIBUTING for details on submitting patches and the contribution workflow.

Contact

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.