MLB (Modular Load Balancer) is a high-performance, flexible, and modular L4/L7 load-balancer written in Go. It is designed to be easily extensible through its modular architecture and provides advanced features like zero-downtime restarts and deep integration with service discovery tools like Consul.
- Multi-protocol Support: TCP, Redis, and Memcache.
- Dynamic Backend Discovery: Support for Consul and static host lists.
- Advanced Health Checking: Native health checks for MySQL and Redis.
- Flexible Filtering: Filter and sort backends based on rich metadata using HCL expressions.
- Load Balancing: Smooth Weighted Round-Robin (SWRR) and Weighted Least Connections (WLC) with dynamic weight resolution.
- Observability: Prometheus metrics and a built-in topology dashboard.
- Performance: Designed for high throughput with connection pooling and efficient protocol handling.
Comprehensive documentation for MLB is available in the docs folder:
- Architecture: Core concepts and the pipeline model.
- Operations Guide: Installation, CLI flags, and zero-downtime restarts.
- Configuration Guide: Global settings and HCL expressions.
- Examples: Practical configuration snippets.
- Monitoring: Dashboard and Prometheus metrics.
Detailed module documentation:
- Build MLB:
go build -o mlb . - Validate:
./mlb -config config.example.hcl -configtest - Run:
./mlb -config config.example.hcl
For production use with zero-downtime reloads, see the Operations Guide.
MLB is released under the Mozilla Public License Version 2.0. See LICENSE for details.