golb
is a lightweight Round Robin Load Balancer implemented in Go. It is designed to distribute incoming network traffic across multiple backend servers in a circular manner, ensuring a balanced workload.
- Simple and efficient Round Robin algorithm.
- Support for dynamic backend server registration and deregistration.
- Health checks to monitor the status of backend servers.
# Clone the repository
git clone https://github.com/mohieey/golb.git
# Navigate to the project directory
cd golb
# Build the project
go build .
# Run!
./golb
-
A file named configs.yaml should be in the same path with the project binary, to provide a file with different name, the run command will be like this
./golb -configs <filename>
-
configs file example:
# The port to listen on
port: 8000
# The nodes that will be balanced between
nodes:
- http://localhost:3000
- http://localhost:3001
- http://localhost:3002