luxiaoxun/NettyRpc
luxiaoxun/NettyRpc has 2,438 GitHub stars and 1,136 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 20:14 UTC. Last push 2026-10-09.
A simple RPC framework based on Netty, ZooKeeper and Spring
What you can do
- Simple code and framework
- Service registry/discovery support by ZooKeeper
- High availability, load balance and failover
- Support different load balance strategy
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalNettyRpc
An RPC framework based on Netty, ZooKeeper and Spring
中文详情:Chinese Details
Features:
- Simple code and framework
- Service registry/discovery support by ZooKeeper
- High availability, load balance and failover
- Support different load balance strategy
- Support asynchronous/synchronous call
- Support different versions of service
- Support different serializer/deserializer
- Dead TCP connection detecting with heartbeat
Design:

How to use (netty-rpc-test)
Define an interface:
public interface HelloService { String hello(String name); String hello(Person person); }Implement the interface with annotation @NettyRpcService:
@NettyRpcService(HelloService.class, version = "1.0") public class HelloServiceImpl implements HelloService { public HelloServiceImpl(){} @Override public String hello(String name) { return "Hello " + name; } @Override public String hello(Person person) { return "Hello " + person.getFirstName() + " " + person.getLastName(); } }Run zookeeper
For example: zookeeper is running on 127.0.0.1:2181
Start server:
- Start server with spring config: RpcServerBootstrap
- Start server without spring config: RpcServerBootstrap2
Call the service:
- Use the client:
final RpcClient rpcClient = new RpcClient("127.0.0.1:2181"); // Sync call HelloService helloService = rpcClient.createService(HelloService.class, "1.0"); String result = helloService.hello("World"); // Async call RpcService client = rpcClient.createAsyncService(HelloService.class, "2.0"); RPCFuture helloFuture = client.call("hello", "World"); String result = (String) helloFuture.get(3000, TimeUnit.MILLISECONDS);- Use annotation @RpcAutowired:
public class Baz implements Foo { @RpcAutowired(version = "1.0") private HelloService helloService1; @RpcAutowired(version = "2.0") private HelloService helloService2; @Override public String say(String s) { return helloService1.hello(s); } }
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,044 starspublic-apis/public-apis
A collective list of free APIs
497,288 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
443,396 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,205 stars