项目作者: codepr

项目描述 :
Rough-and-ready lightweight load-balancer in Rust.
高级语言: Rust
项目地址: git://github.com/codepr/rlb.git
创建时间: 2020-08-24T17:48:27Z
项目社区:https://github.com/codepr/rlb

开源协议:BSD 2-Clause "Simplified" License

下载


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:

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

And run the load-balancer with config.yaml

  1. listen_on: "127.0.0.1:6767"
  2. backends:
  3. - "127.0.0.1:7892"
  4. - "127.0.0.1:9898"
  5. probe_interval: 5000
  6. balancing: round-robin