A fast and robust Layer 7 distributed load balancer capable of many different load balancing strategies.
git clone https://github.com/markrepedersen/loblaw
cd loblaw
cargo run
Specify a .toml configuration file (default: ‘config.toml’) with your configuration details.
The following options are allowed:
# Required
ip = "127.0.0.1"
# Required
port = "8080"
# Required
strategy = "RoundRobin"
# Required
[[backends]]
ip = "3.220.112.94"
port = "80"
path = "/ip"
[[backends]]
ip = "3.220.112.94"
port = "80"
path = "/ip"
[[backends]]
ip = "3.220.112.94"
port = "80"
path = "/ip"
# Required
[health_check]
port = 8080
timeout = 10
interval = 5
healthy_threshold = 10
unhealthy_threshold = 10
Loblaw will proxy requests from clients and distribute them to available servers based on a configured strategy.
The strategy define the rules for which a given request is sent to a certain server. The following are possible strategies to choose from:
- Round Robin (Default)
- Weighted Round Robin
- IP Hash
- URL Path Hash
Session stickiness creates an affinity between a client and a server. This is sometimes useful for architectures that weren’t designed with load balancers in mind. It is also useful to take advantage of server caching of resources as well as optimizing network resource usage. TODO: Currently only cookie-based sticky sessions are supported.