Skip to main content

Install

curl -sSL https://package.ultrabalancer.com/install.sh | sh
That’s it! Verify with:
ultrabalancer --version

Start Load Balancing

# Basic - round-robin across 2 backends
ultrabalancer start round-robin backend1:8080 backend2:8080 -p 80

# Least connections - routes to least busy backend
ultrabalancer start least-connections backend1:8080 backend2:8080 -p 80

# Custom port
ultrabalancer start round-robin app1:8080 app2:8080 -p 8080

Add Monitoring

# One command to start Grafana + Prometheus
ultrabalancer dashboard --start

Use a Config File

Create config.yaml:
listen_address: "0.0.0.0"
listen_port: 8080
algorithm: "round-robin"

backends:
  - host: "192.168.1.10"
    port: 8080
    weight: 100
  - host: "192.168.1.11"
    port: 8080
    weight: 100
Run with the config:
ultrabalancer start -c config.yaml

Test It

# Send requests
curl http://localhost:8080
curl http://localhost:8080/health

Available Algorithms

AlgorithmUse Case
round-robinSimple equal distribution
least-connectionsRoute to least busy backend
ip-hashSession affinity by client IP
weightedPriority-based with weights
randomRandom selection
power-of-twoPick 2 random, use least loaded
fastest-responseRoute to fastest responder

Next Steps