Skip to content

Toy example of using Zookeeper for load balancing with gRPC

Notifications You must be signed in to change notification settings

makdharma/grpc-zookeeper-lb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

grpc-zookeeper-lb

This is a toy example of using Zookeeper for load balancing with gRPC. To run:

  1. Compile HelloWorldClient and HelloWorldServer.

git clone https://github.com/makdharma/grpc-zookeeper-lb

cd grpc-zookeeper-lb/examples; ./gradelw installDist

  1. Download zookeeper stock docker image and start zookeeper.

docker pull zookeeper

docker run -p 2181:2181 --restart always -d zookeeper

  1. Start couple of servers

./build/install/examples/bin/hello-world-server 50000 zk://localhost:2181

./build/install/examples/bin/hello-world-server 50001 zk://localhost:2181

  1. Run hello-world-client. It should alternate between two servers.

./build/install/examples/bin/hello-world-client zk://localhost:2181

About

Toy example of using Zookeeper for load balancing with gRPC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published