Skip to content
/ rlb Public

Rough-and-ready lightweight load-balancer in Rust.

License

Notifications You must be signed in to change notification settings

codepr/rlb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rlb

(R)ust(L)oad(B)alancer, simple reverse-proxy written to learn the language.

PoC ported from llb 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:

$ docker run --rm --name nginx-1 --publish 7892:80 nginx
$ docker run --rm --name nginx-2 --publish 9898:80 nginx

And run the load-balancer with config.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

About

Rough-and-ready lightweight load-balancer in Rust.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages