GoScale is a versatile load balancing application written in Go that provides various algorithms for distributing incoming traffic among backend servers. It supports the following algorithms:
To install GoScale , you need to have Go installed. Then, you can clone the repository and build the application using the following commands:
git clone https://github.com/lokesh-katari/GoScale
cd GoScale
go build -o goscale cmd/main.go
docker pull lokeshkatari/goscale
Then, create a config.json file to configure the backend servers, their weights, and the load balancing algorithm. Finally, run the Docker container:
docker run -v /path/to/config.json:/app/config.json -p 8082:8082 lokeshkatari/goscale:latest
GoScale is configured via a config.json file. You can specify the backend servers, their weights, the load balancing algorithm, and other settings in this file.
{
"servers": [
{
"url": "http://localhost:8081",
"weight": 2
},
{
"url": "http://localhost:8082",
"weight": 1
}
],
"algorithm": "WeightedRoundRobin",
"proxy": "http://localhost:8080"
}
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details. #DEMO