https://github.com/codepr/rlb
Rough-and-ready lightweight load-balancer in Rust.
https://github.com/codepr/rlb
http load-balancer reverse-proxy rust
Last synced: 2 months ago
JSON representation
Rough-and-ready lightweight load-balancer in Rust.
- Host: GitHub
- URL: https://github.com/codepr/rlb
- Owner: codepr
- License: bsd-2-clause
- Created: 2020-08-24T17:48:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-09T18:14:05.000Z (over 1 year ago)
- Last Synced: 2024-12-09T19:24:10.470Z (over 1 year ago)
- Topics: http, load-balancer, reverse-proxy, rust
- Language: Rust
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
rlb
===
(**R**)ust(**L**)oad(**B**)alancer, simple reverse-proxy written to learn the
language.
PoC ported from [llb](https://github.com/codepr/llb.git) as a learning and
comparative exercise, evaluation of Rust language and dabbling with a solid
type-system.
Features:
- Basic healthcheck for backends
- Round-robin, hash-balancing, random-balancing, leasttraffic
To test it I run some local `nginx` on docker:
```sh
$ docker run --rm --name nginx-1 --publish 7892:80 nginx
```
```sh
$ docker run --rm --name nginx-2 --publish 9898:80 nginx
```
And run the load-balancer with `config.yaml`
```yaml
listen_on: "127.0.0.1:6767"
backends:
- "127.0.0.1:7892"
- "127.0.0.1:9898"
probe_interval: 5000
balancing: round-robin
```