go-lb is a load balancer implemented with Go. It uses simple round robin to select backends to handle requests, and performs passive health checks to eliminate inactive backends. It uses http's Reverse Proxy to route requests and fetch responses. Please note that this project is still a work-in-progress.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Go language Built-in Go packages
Note: Make sure your GOBIN and GOPATH environment variables are set up appropriately. For example:
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
To install, first run
go get github.com/divbhasin/go-lb
Usage of go-lb:
-config string
The name of the config file to use (default: config.yml)
A sample config file:
port: 3030
backends:
- localhost:3031
- localhost:3031
- Divyam Bhasin
This project is licensed under the MIT License - see the LICENSE file for details