{"id":13412641,"url":"https://github.com/smallnest/rpcx","last_synced_at":"2025-05-13T15:12:49.406Z","repository":{"id":39511933,"uuid":"59101986","full_name":"smallnest/rpcx","owner":"smallnest","description":"Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. Try it. Test it. If you feel it's better, use it! 𝐉𝐚𝐯𝐚有𝐝𝐮𝐛𝐛𝐨, 𝐆𝐨𝐥𝐚𝐧𝐠有𝐫𝐩𝐜𝐱! build for cloud!","archived":false,"fork":false,"pushed_at":"2025-04-16T23:17:21.000Z","size":28304,"stargazers_count":8209,"open_issues_count":6,"forks_count":1182,"subscribers_count":346,"default_branch":"master","last_synced_at":"2025-04-23T18:57:46.639Z","etag":null,"topics":["dubbo","grpc","microservice","microservices","rpc","service-discovery"],"latest_commit_sha":null,"homepage":"https://rpcx.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smallnest.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://github.com/smallnest/sponsors/blob/master/FUNDING.md"]}},"created_at":"2016-05-18T09:34:05.000Z","updated_at":"2025-04-23T14:31:56.000Z","dependencies_parsed_at":"2023-10-12T15:12:29.503Z","dependency_job_id":"eb7e0ee7-c602-4c13-ad05-0345bcba40de","html_url":"https://github.com/smallnest/rpcx","commit_stats":{"total_commits":826,"total_committers":76,"mean_commits":"10.868421052631579","dds":"0.26029055690072644","last_synced_commit":"2f9a7122765033625afeaff46f962a6e409950fa"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallnest%2Frpcx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallnest%2Frpcx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallnest%2Frpcx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallnest%2Frpcx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smallnest","download_url":"https://codeload.github.com/smallnest/rpcx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253969266,"owners_count":21992264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dubbo","grpc","microservice","microservices","rpc","service-discovery"],"created_at":"2024-07-30T20:01:27.183Z","updated_at":"2025-05-13T15:12:44.387Z","avatar_url":"https://github.com/smallnest.png","language":"Go","readme":"- **stable branch**: v1.7.x\n- **development branch**: master\n\n\u003ca href=\"https://rpcx.io/\"\u003e\u003cimg height=\"160\" src=\"http://rpcx.io/logos/rpcx-logo-text.png\"\u003e\u003c/a\u003e\n\nOfficial site: [http://rpcx.io](http://rpcx.io/)\n\n[![License](https://img.shields.io/:license-apache%202-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![GoDoc](https://godoc.org/github.com/smallnest/rpcx?status.png)](http://godoc.org/github.com/smallnest/rpcx)  [![github actions](https://github.com/smallnest/rpcx/actions)](https://github.com/smallnest/rpcx/actions/workflows/go.yml/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/smallnest/rpcx)](https://goreportcard.com/report/github.com/smallnest/rpcx) [![coveralls](https://coveralls.io/repos/smallnest/rpcx/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/smallnest/rpcx?branch=master) [![QQ3群](https://img.shields.io/:QQ3群-953962236-blue.svg)](_documents/rpcx_dev_qq3.jpg) \n\n**Notice: etcd**\n\nsince rpcx 1.7.6, some plugins have been moved to the independent project:\n\n- `etcd` plugin has been moved to [rpcx-etcd](https://github.com/rpcxio/rpcx-etcd)\n- `zookeeper` plugin has been moved to [rpcx-zookeeper](https://github.com/rpcxio/rpcx-zookeeper)\n- `consul` plugin has been moved to [rpcx-consul](https://github.com/rpcxio/rpcx-consul)\n- `redis` plugin has been moved to [rpcx-redis](https://github.com/rpcxio/rpcx-redis)\n- `influxdb` plugin has been moved to [rpcx-plugins](https://github.com/rpcxio/rpcx-plugins)\n- `opentelemetry` plugin has been moved to [rpcx-plugins](https://github.com/rpcxio/rpcx-plugins)\n\n## Announce\n\nA tcpdump-like tool added: [rpcxdump](https://github.com/smallnest/rpcxdump)。 You can use it to debug communications between rpcx services and clients.\n\n![](https://github.com/smallnest/rpcxdump/blob/master/snapshoot.png)\n\n\n## Cross-Languages\nyou can use other programming languages besides Go to access rpcx services.\n\n- **rpcx-gateway**: You can write clients in any programming languages to call rpcx services via [rpcx-gateway](https://github.com/rpcxio/rpcx-gateway)\n- **http invoke**: you can use the same http requests to access rpcx gateway\n- **Java Services/Clients**: You can use [rpcx-java](https://github.com/smallnest/rpcx-java) to implement/access rpcx services via raw protocol.\n- **rust rpcx**: You can write rpcx services in rust by [rpcx-rs](https://github.com/smallnest/rpcx-rs)\n\n\u003e If you can write Go methods, you can also write rpc services. It is so easy to write rpc applications with rpcx.\n\n## Installation\n\ninstall the basic features:\n\n`go get -v github.com/smallnest/rpcx/...`\n\n\nIf you want to use `quic`、`kcp` registry, use those tags to `go get` 、 `go build` or `go run`. For example, if you want to use all features, you can:\n\n```sh\ngo get -v -tags \"quic kcp\" github.com/smallnest/rpcx/...\n```\n\n**_tags_**:\n- **quic**: support quic transport\n- **kcp**: support kcp transport\n\n## Which companies are using rpcx?\n\n\u003cp float=\"left\"\u003e\n  \u003cimg style=\"padding-bottom: 20px;\" src=\"https://user-images.githubusercontent.com/865763/102993220-b967f000-4557-11eb-9747-703a6cbb9fb1.png\" width=\"200\" /\u003e\n  \u003cimg style=\"padding-bottom: 20px;\" src=\"https://user-images.githubusercontent.com/865763/113414067-a8e4d280-93ee-11eb-9f42-1373d7e766c1.png\" width=\"200\" /\u003e\n  \u003cimg style=\"padding-bottom: 20px;\" src=\"https://user-images.githubusercontent.com/865763/102993433-267b8580-4558-11eb-9e45-4e1a86d61688.png\" width=\"200\" /\u003e \n  \u003cimg style=\"padding-bottom: 20px;\" src=\"https://user-images.githubusercontent.com/865763/102993530-4743db00-4558-11eb-9f76-1ee69e992b82.png\" width=\"200\" /\u003e\n  \u003cimg style=\"padding-bottom: 20px;\" src=\"https://user-images.githubusercontent.com/865763/102993612-722e2f00-4558-11eb-849a-3264c430aef9.png\" width=\"200\" /\u003e\n  \u003cimg style=\"padding-bottom: 20px;\" src=\"https://user-images.githubusercontent.com/865763/102993785-c20cf600-4558-11eb-82b9-27b801aca4ff.png\" width=\"200\" /\u003e\n\u003c/p\u003e\n\n## Features\nrpcx is a RPC framework like [Alibaba Dubbo](http://dubbo.io/) and [Weibo Motan](https://github.com/weibocom/motan).\n\n**rpcx** is created for targets:\n1. **Simple**: easy to learn, easy to develop, easy to integrate and easy to deploy\n2. **Performance**: high performance (\u003e= grpc-go)\n3. **Cross-platform**: support _raw slice of bytes_, _JSON_, _Protobuf_ and _MessagePack_. Theoretically it can be used with java, php, python, c/c++, node.js, c# and other platforms\n4. **Service discovery and service governance**: support zookeeper, etcd and consul.\n\n\nIt contains below features\n- Support raw Go functions. There's no need to define proto files.\n- Pluggable. Features can be extended such as service discovery, tracing.\n- Support TCP, HTTP, [QUIC](https://en.wikipedia.org/wiki/QUIC) and [KCP](https://github.com/skywind3000/kcp)\n- Support multiple codecs such as JSON, Protobuf, [MessagePack](https://msgpack.org/index.html) and raw bytes.\n- Service discovery. Support peer2peer, configured peers, [zookeeper](https://zookeeper.apache.org), [etcd](https://github.com/coreos/etcd), [consul](https://www.consul.io) and [mDNS](https://en.wikipedia.org/wiki/Multicast_DNS).\n- Fault tolerance：Failover, Failfast, Failtry.\n- Load banlancing：support Random, RoundRobin, Consistent hashing, Weighted, network quality and Geography.\n- Support Compression.\n- Support passing metadata.\n- Support Authorization.\n- Support heartbeat and one-way request.\n- Other features: metrics, log, timeout, alias, circuit breaker.\n- Support bidirectional communication.\n- Support access via HTTP so you can write clients in any programming languages.\n- Support API gateway.\n- Support backup request, forking and broadcast.\n\n\nrpcx uses a binary protocol and platform-independent, which means you can develop services in other languages such as Java, python, nodejs, and you can use other prorgramming languages to invoke services developed in Go.\n\nThere is a UI manager: [rpcx-ui](https://github.com/smallnest/rpcx-ui).\n\n## Performance\n\nTest results show rpcx has better performance than other rpc framework except standard rpc lib.\n\n\nThe benchmark code is at [rpcx-benchmark](https://github.com/rpcx-ecosystem/rpcx-benchmark).\n\n**Listen to others, but test by yourself**.\n\n**_Test Environment_**\n\n- **CPU**: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz, 32 cores\n- **Memory**: 32G\n- **Go**: 1.9.0\n- **OS**: CentOS 7 / 3.10.0-229.el7.x86_64\n\n**_Use_**\n- protobuf\n- the client and the server on the same server\n- 581 bytes payload\n- 500/2000/5000 concurrent clients\n- mock processing time: 0ms, 10ms and 30ms\n\n**_Test Result_**\n\n### mock 0ms process time\n\n\u003ctable\u003e\u003ctr\u003e\u003cth\u003eThroughputs\u003c/th\u003e\u003cth\u003eMean Latency\u003c/th\u003e\u003cth\u003eP99 Latency\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd width=\"30%\"\u003e\u003cimg src=\"http://colobu.com/2018/01/31/benchmark-2018-spring-of-popular-rpc-frameworks/p0-throughput.png\"\u003e\u003c/td\u003e\u003ctd width=\"30%\"\u003e\u003cimg src=\"http://colobu.com/2018/01/31/benchmark-2018-spring-of-popular-rpc-frameworks/p0-latency.png\"\u003e\u003c/td\u003e\u003ctd width=\"30%\"\u003e\u003cimg src=\"http://colobu.com/2018/01/31/benchmark-2018-spring-of-popular-rpc-frameworks/p0-p99.png\"\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n\n### mock 10ms process time\n\n\u003ctable\u003e\u003ctr\u003e\u003cth\u003eThroughputs\u003c/th\u003e\u003cth\u003eMean Latency\u003c/th\u003e\u003cth\u003eP99 Latency\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd width=\"30%\"\u003e\u003cimg src=\"http://colobu.com/2018/01/31/benchmark-2018-spring-of-popular-rpc-frameworks/p10-throughput.png\"\u003e\u003c/td\u003e\u003ctd width=\"30%\"\u003e\u003cimg src=\"http://colobu.com/2018/01/31/benchmark-2018-spring-of-popular-rpc-frameworks/p10-latency.png\"\u003e\u003c/td\u003e\u003ctd width=\"30%\"\u003e\u003cimg src=\"http://colobu.com/2018/01/31/benchmark-2018-spring-of-popular-rpc-frameworks/p10-p99.png\"\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n\n### mock 30ms process time\n\n\u003ctable\u003e\u003ctr\u003e\u003cth\u003eThroughputs\u003c/th\u003e\u003cth\u003eMean Latency\u003c/th\u003e\u003cth\u003eP99 Latency\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd width=\"30%\"\u003e\u003cimg src=\"http://colobu.com/2018/01/31/benchmark-2018-spring-of-popular-rpc-frameworks/p30-throughput.png\"\u003e\u003c/td\u003e\u003ctd width=\"30%\"\u003e\u003cimg src=\"http://colobu.com/2018/01/31/benchmark-2018-spring-of-popular-rpc-frameworks/p30-latency.png\"\u003e\u003c/td\u003e\u003ctd width=\"30%\"\u003e\u003cimg src=\"http://colobu.com/2018/01/31/benchmark-2018-spring-of-popular-rpc-frameworks/p30-p99.png\"\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n\n## Examples\n\nYou can find all examples at [rpcxio/rpcx-examples](https://github.com/rpcxio/rpcx-examples).\n\nThe below is a simple example.\n\n\n**Server**\n\n```go\n    // define example.Arith\n    ……\n\n    s := server.NewServer()\n\ts.RegisterName(\"Arith\", new(example.Arith), \"\")\n\ts.Serve(\"tcp\", addr)\n\n```\n\n\n**Client**\n\n```go\n    // prepare requests\n    ……\n\n    d, err := client.NewPeer2PeerDiscovery(\"tcp@\"+addr, \"\")\n\txclient := client.NewXClient(\"Arith\", client.Failtry, client.RandomSelect, d, client.DefaultOption)\n\tdefer xclient.Close()\n\terr = xclient.Call(context.Background(), \"Mul\", args, reply, nil)\n```\n\n## Contributors\n\n\u003ca href=\"https://github.com/smallnest/rpcx/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=smallnest/rpcx\" /\u003e\n\u003c/a\u003e\n\n\n## Contribute\n\nsee [contributors](https://github.com/smallnest/rpcx/graphs/contributors).\n\nWelcome to contribute:\n- submit issues or requirements\n- send PRs\n- write projects to use rpcx\n- write tutorials or articles to introduce rpcx\n\n## License\n\nApache License, Version 2.0 \n","funding_links":["https://github.com/smallnest/sponsors/blob/master/FUNDING.md"],"categories":["Distributed Systems","Misc","开源类库","Go","Open source library","\u003cspan id=\"分布式系统-distributed-systems\"\u003e分布式系统 Distributed Systems\u003c/span\u003e","Language-Specific","Useful Libraries","Platform/Framework/SDK/Language","语言资源库","后端开发框架及项目","rpc","分布式系统","分佈式系統","分布式系统开发","service-discovery","Relational Databases","Service Toolkits"],"sub_categories":["Search and Analytic Databases","RPC","Advanced Console UIs","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","Go","PHP","go","管理面板","检索及分析资料库","高級控制台界面","常用工具","SQL 查询语句构建库","高级控制台界面"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallnest%2Frpcx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmallnest%2Frpcx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallnest%2Frpcx/lists"}