rpcx: a Go RPC framework that registers plain structs and keeps its plugins in other repositories
Best microservices framework in Go, like Alibaba Dubbo but with more features and easy scaling. Try it, test it, and if you feel it's better, use it! Just as Java has Dubbo, Golang has rpcx! Built for the cloud.
At a glance
- What is it?
- rpcx is a Go microservices framework modelled on Alibaba Dubbo and Weibo Motan. It registers ordinary Go methods as RPC services without proto files, but its registry plugins now live in separate modules, its transports depend on build tags, and its version labels disagree with each other.
- Who is it for?
- rpcx suits Go teams that want Dubbo-style RPC over plain structs, with load balancing and failover built in, and that accept managing registry plugins as separate modules. It is a questionable pick if you need a single clear license identifier or an up-to-date benchmark, since the published numbers come from a Go 1.9.0 test setup.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 74 days ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.
Star history
- smallnest/rpcx8,318 ★ · +4
| Repository | 2026-09-22 | 2026-11-14 |
|---|---|---|
| smallnest/rpcx | 8.3k | 8.3k |
4 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Plain Go methods become RPC services without proto files
rpcx is described as an RPC framework like Alibaba Dubbo and Weibo Motan, with the tagline that if you can write Go methods, you can write RPC services. Its first feature is support for raw Go functions, so there is no need to define proto files. A server registers a struct and serves it:
s := server.NewServer()
s.RegisterName("Arith", new(example.Arith), "")
s.Serve("tcp", addr)The design goals are listed as simple, high performance, cross-platform and service discovery with governance. Codecs include raw bytes, JSON, Protobuf and MessagePack. The convenience has a cost: because the service contract is a Go type, other languages cannot generate stubs from a schema file, which is why the gateway and the cross-language projects exist.
Register exposes every exported method, and the whitelist variant is the safer door
Register and RegisterName expose every suitable exported method of a struct as RPC. That means a method you add to the struct next month becomes remotely callable the moment you deploy it. To avoid that, the framework offers RegisterWithMethods and RegisterNameWithMethods, which take a whitelist of method names. In the example, Arith has Mul, Add and Sub, but only Mul and Add are registered.
The whitelist rules are strict. Methods not listed are not registered, so a newly added method stays private unless you opt it in. A name that does not exist on the receiver, or that exists but is not a suitable RPC method, makes registration fail with different error messages for the two cases, and nothing is partially registered. An empty whitelist is also an error. For services with sensitive methods, prefer the whitelist forms.
QUIC, KCP and RDMA transports exist only behind build tags
The basic install is go get with the repository path and three dots. TCP and HTTP work with that. To use the QUIC or KCP transports you must pass build tags. The README example enables both at once:
go get -v -tags "quic kcp" github.com/smallnest/rpcx/...The tag list is quic for QUIC transport, kcp for KCP transport, and rdma for the experimental RDMA transport, which is built on gordma's rdmanet.Conn and requires libibverbs on Linux. The consequence is that the same tags must be passed to go build and go run as well. A service built without the tag will not offer that transport, and the failure shows up at run time instead of compile time, so keep the tags in your Makefile or CI script.
Registry plugins moved to separate repositories in 1.7.6
Since rpcx 1.7.6, several plugins were moved out of the main repository. The etcd, zookeeper, consul and redis plugins now live in rpcx-etcd, rpcx-zookeeper, rpcx-consul and rpcx-redis under the rpcxio organization, and the influxdb and opentelemetry plugins live in rpcx-plugins.
The feature list still says that service discovery supports peer to peer, configured peers, zookeeper, etcd, consul and mDNS. Both statements are true, but the second depends on the first: to use etcd discovery you add the separate module and its version, which then has to be compatible with your rpcx version. The go.mod of the main project still references libkv from the same organization, redis clients, a Thrift library, quic-go and kcp-go, so the dependency list is long even after the split.
Fault tolerance, load balancing and call modes are built in
Fault tolerance modes are Failover, Failfast and Failtry. Load balancing supports Random, RoundRobin, consistent hashing, Weighted, network quality and geography. Other features include compression, passing metadata, authorization, heartbeat and one-way requests, metrics, log, timeout, alias and a circuit breaker.
Call patterns go beyond plain request and response. The framework lists bidirectional communication, backup requests, forking and broadcast. These choices change cost: a backup request or a fork sends work to more than one server, so it can reduce tail latency at the price of extra load, and broadcast calls every instance. Pick them per method deliberately instead of enabling them globally.
The README names three different current versions
The top of the README says the stable branch is v1.7.x and the development branch is master. The announcement section then says Stable branch: v1.9.4. The releases list shows v1.9.3 on 2026-04-01 as the newest, preceded by v1.9.1 on 2025-08-28 and v1.9.0 on 2025-01-28.
So there is no single answer to which version is stable. The practical advice is to take the newest tagged release, pin it in go.mod, and read the changelog before upgrading. The go.mod declares go 1.26.0, so an old Go toolchain will not build the current master. The last push was on 2026-09-03, which is two months before this article, so do not describe the project as under active daily development.
The benchmark is old, and the license identifier is unclear
The performance claim is that rpcx is equal to or faster than grpc-go, with results better than other RPC frameworks except the standard library RPC. The test environment is a 32-core Intel Xeon E5-2630 v3 at 2.40 GHz with 32 GB of memory, Go 1.9.0 and CentOS 7. It used Protobuf with a 581 byte payload, the client and server on the same machine, 500, 2000 and 5000 concurrent clients, and mock processing times of 0, 10 and 30 ms.
Those figures predate modern Go releases by many versions. The README itself says to listen to others but test by yourself, and the benchmark code is in a separate rpcx-benchmark repository you can run. On licensing, GitHub reports NOASSERTION, while the badge in the README points to Apache-2.0 and a LICENSE file exists. Read that file before using the code commercially.
Editorial conclusion
rpcx suits Go teams that want Dubbo-style RPC over plain structs, with load balancing and failover built in, and that accept managing registry plugins as separate modules. It is a questionable pick if you need a single clear license identifier or an up-to-date benchmark, since the published numbers come from a Go 1.9.0 test setup. Before adopting, decide which branch you follow, because the README names v1.7.x, v1.9.4 and master in different places.
Frequently asked questions
What is rpcx?
rpcx is a Go RPC and microservices framework like Alibaba Dubbo and Weibo Motan. It exposes plain Go methods as services over TCP, HTTP, QUIC or KCP with built-in service discovery options.
How do I install rpcx with QUIC and KCP support?
Run go get -v -tags "quic kcp" github.com/smallnest/rpcx/... and pass the same tags to go build and go run. The rdma tag adds an experimental RDMA transport.
Can I call rpcx services from languages other than Go?
Yes. You can use rpcx-gateway or plain HTTP requests, the rpcx-java project for Java services and clients, or rpcx-rs to write services in Rust.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/smallnest-rpcx)Star history chart for your README
[](https://hysenlabs.com/projects/smallnest-rpcx)Was this useful?