stabl is a lightweight load balancer built in Go, using a round-robin algorithm to efficiently distribute incoming traffic across multiple servers. This tool helps to ensure better performance and reliability by stabilizing traffic and balancing load across your application servers.
- Round-Robin Load Balancing: Evenly distributes incoming requests to servers using a round-robin method.
- Cross-Platform Compatibility: Works on Linux, macOS, and Windows.
- Easy Setup: Minimal configuration required to get started.
- Customizable Settings: Modify load balancing behavior through a simple configuration file.
- Logging: Logs load balancer activity to a file for easy monitoring and debugging.
Go to the Releases page and download the appropriate version of stabl
for your operating system.
If required, extract the downloaded file and place the stabl
executable in your preferred directory.
Create or move the config.json
file to the same directory as the executable. The configuration file should define the port for the load balancer and the list of servers you want to balance.
An example config.json
file:
{
"port": 8080,
"checkAfter": 5,
"servers": [
"http://server1.example.com",
"http://server2.example.com",
"http://server3.example.com"
],
"logFile": "stabl.log"
}
port
: The port on whichstabl
will listen for incoming traffic.checkAfter
: Interval in seconds after which the health of the servers is checked.servers
: List of backend servers to distribute traffic.logFile
: File path for storing log information about load balancer activity.
After downloading and configuring stabl
, you can run it by providing the path to the configuration file, the port, and the log file path using command-line flags. The default config path is ./config.json
, and the default port is 8080
.
Note: Command-line flags will override the settings in the config.json
file.
./stabl --config=path/to/config.json --port=8080 --logFile=path/to/log/file
./stabl_darwin --config=path/to/config.json --port=8080 --logFile=path/to/log/file
stabl.exe --config=path/to/config.json --port=8080 --logFile=path/to/log/file
We welcome contributions to improve stabl
. Here's how you can contribute:
- Fork the repository on GitHub.
- Create a new branch for your changes.
- Make your modifications and commit them.
- Push your branch to GitHub.
- Open a pull request with a description of the changes you've made.
This project is licensed under the GNU General Public License v3.0.
For questions, suggestions, or reporting issues, please open an issue on our GitHub repository.