- TCP/UDP support
- Hot swap of backends
- Low resource footprint
- Telnet management console
Download:
git clone https://github.com/reneManqueros/load-balancer
Compile:
cd load-balancer && go build .
Execute as load balancer:
./loadbalancer balance
Add a backend:
./loadbalancer add 127.0.0.1:8080
Add a backend via telnet - Send a "+" and the address:
telnet 127.0.0.1 33333
+127.0.0.1:8080
Remove a backend:
./loadbalancer add 127.0.0.1:8080
Remove a backend via telnet - Send a "-" and the address:
telnet 127.0.0.1 33333
-127.0.0.1:8080
Listen for TCP (default)
./loadbalancer balance network=tcp
Listen for UDP
./loadbalancer balance network=tcp
Change listen Port (default: 8081)
./loadbalancer balance address=:8088
Disable management console
./loadbalancer balance management=""
Config file location (default: ./backends.yml)
./loadbalancer balance config="/etc/loadbalancer/backends.yml"
Enable verbose mode (default: false)
./loadbalancer balance verbose=true
Backend timeout in milliseconds (default: 0)
./loadbalancer balance timeout=300
Change management console host/port
./loadbalancer balance management="127.0.0.1:12345"