Skip to content

acmpesuecc/bal.rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bal.rs

 ____        _            
|  _ \      | |           
| |_) | __ _| |  _ __ ___ 
|  _ < / _` | | | '__/ __|
| |_) | (_| | |_| |  \__ \
|____/ \__,_|_(_)_|  |___/
L7 Load Balancer Implemented in Rust 🦀

This project is part of Tilde 3.0 HSP PESU-ECC's summer mentoring program.

Mentees

Mentors

Getting started

To build the application locally, ensure you have the Rust compiler and Cargo package manager installed. Once installed, clone the repository and build the application using Cargo:

git clone https://github.com/homebrew-ec-foss/bal.rs
cd bal.rs
cargo build

For a production-ready build, you can use:

cargo build --release

How to Use

The Application

After building, the main executable will be located in /target/debug or /target/release based on the build command used. Navigate to the directory and type

Balrs help start

in the terminal to get a list of available commands.

Alternatively, from the root directory of Bal.rs, you can use:

cargo run help start

for the same result.

The Config file

The config.yaml file allows you to customize the Load Balancer settings:

  • Load Balancer address: The URL of the Load Balancer(Default: http://localhost:8000)
  • Algorithm: The load balancing algorithm to be used by Balrs(Default: round robin)
  • Servers: List of server URLs to which Balrs can send requests
  • Weights: List of weights of respective servers, used by weighted load balancing algorithms
  • Max connections: List of the maximum number of connections each server is allowed to handle
  • Timeout: Maximum time allowed for a server to respond before it is marked as dead
  • Health check interval: Time interval at which server health checks are performed

Releases

No releases published

Packages

No packages published

Languages

  • Rust 94.2%
  • Python 4.2%
  • HTML 1.1%
  • Dockerfile 0.5%