Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Simple command-line reference for UltraBalancer
# Basic usage - 2 backends, round-robin
ultrabalancer -b server1:8080 -b server2:8080
# Custom port
ultrabalancer -p 80 -b backend1:8080 -b backend2:8080
# With weights
ultrabalancer -b server1:8080:200 -b server2:8080:100
ultrabalancer start round-robin server1:8080 server2:8080
ultrabalancer dashboard --start # Interactive setup
ultrabalancer dashboard --status # Check status
ultrabalancer dashboard --stop # Stop dashboard
ultrabalancer validate -f config.yaml
ultrabalancer example
ultrabalancer info
| 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 |
| 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 |
# List backends
curl -H "X-API-Key: YOUR_KEY" http://localhost:8080/admin/backends
# Add backend
curl -X POST -H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"address":"10.0.0.5:8080","weight":100}' \
http://localhost:8080/admin/backends
# Remove backend
curl -X DELETE -H "X-API-Key: YOUR_KEY" \
-d '{"address":"10.0.0.5:8080"}' \
http://localhost:8080/admin/backends
# Update weight
curl -X PUT -H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"address":"10.0.0.5:8080","weight":150}' \
http://localhost:8080/admin/backends/weight
| 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 |
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error |