Crates.io | ferrugem |
lib.rs | ferrugem |
version | 0.1.3 |
source | src |
created_at | 2024-07-28 20:15:55.492924 |
updated_at | 2024-08-04 13:58:28.20412 |
description | A lightweight and efficient load balancer implemented in Rust. |
homepage | |
repository | https://github.com/erickcestari/ferrugem |
max_upload_size | |
id | 1318218 |
size | 57,611 |
A lightweight and efficient load balancer implemented in Rust.
This project is a load balancer built using the Rust programming language and the Axum web framework. It is designed to be efficient and lightweight, capable of distributing incoming HTTP requests across multiple backend servers.
reqwest
library for making HTTP requests to backend servers.tokio::sync::Mutex
for state management.or
docker run -p 9999:9999 -v $(pwd)/ferrugem.toml:/usr/local/bin/ferrugem.toml erickcestari/ferrugem
Clone the repository:
git clone https://github.com/erickcestari/ferrugem.git
cd rust-load-balancer
Build the project:
cargo build --release
Run the load balancer:
cargo run --release
The load balancer can be configured using a ferrugem.toml
struct. Below is an example configuration:
port = 9999
log_level = 'info'
algorithm = 'round-robin'
[[servers]]
name = "api1"
url = "https://jsonplaceholder.typicode.com"
[[servers]]
name = "api2"
url = "https://jsonplaceholder.typicode.com"
Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.
This project is licensed under the MIT License.