Quick Start
Commands
start
Start the load balancer.dashboard
Deploy Grafana/Prometheus monitoring.validate
Check config file syntax.example
Print example config.info
Show version and algorithms.Options
| Flag | Description | Default |
|---|---|---|
-p, --port | Listen port | 8080 |
-b, --backend | Backend server (host:port) | Required |
-a, --algorithm | Load balancing algorithm | round-robin |
-w, --weight | Default backend weight | 100 |
-c, --config | Config file path | - |
--host | Bind address | 0.0.0.0 |
Algorithms
| Algorithm | Description |
|---|---|
round-robin | Even distribution (default) |
least-connections | Fewest active connections |
ip-hash | Same client → same server |
random | Random backend |
weighted | Weight-based distribution |
power-of-two | Pick 2, use least loaded |
fastest-response | Fastest recent response |
Admin API
Secure API for managing backends (requires API key).Admin Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /admin/backends | List all backends |
| POST | /admin/backends | Add backend |
| DELETE | /admin/backends | Remove backend |
| PUT | /admin/backends/weight | Update weight |
| POST | /admin/backends/drain | Start draining |
| POST | /admin/backends/undrain | Stop draining |
| GET | /admin/health | API health check |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error |