Load balancing
two ways.

Flux is a lightweight service registry and load balancer. Use redirect mode for direct client-to-service traffic, or proxy mode behind Nginx for HTTPS production.

Three operations. One registry. Zero configuration files.

Service Registry

Redis-backed, TTL-based health tracking. Services expire automatically — no heartbeats, no polling.

Smart Balancer

Redirect mode (302) or reverse proxy mode. Least-connections selection. REST API, no config files.

Simple API

RESTful, JSON over HTTP. Register, heartbeat, discover — everything you need.

Client
302
flux
redirect | proxy
Service A
Service B

Try it in 30 seconds. Start flux, register a service, discover it.

Register
$ curl -X POST http://localhost:8080/register \
  -H "Content-Type: application/json" \
  -d '{"name":"my-service","host":"10.0.0.1","port":9000}'
{"instance_id":"10.0.0.1:9000","ttl_seconds":15}
Redirect mode (default)
$ curl http://localhost:8080/discover/my-service
302 Found
Location: http://10.0.0.1:9000
Proxy mode (PROXY_MODE=true)
$ curl http://localhost:8080/discover/my-service
200 OK
{"hello":"world"}  ← response from backend

Flux can redirect or proxy. Pick the mode that fits your architecture.

flux Reverse Proxy (nginx, HAProxy, Envoy)
Latency overhead ~1ms (redirect) / ~5ms (proxy) Proxy buffer + forward (varies)
Traffic model Redirect: client direct. Proxy: through flux. All traffic through proxy
Configuration REST API + env vars, no config files YAML/conf, reload required
Scaling Stateless, add more flux nodes Scale proxy pool + config sync
Best for Internal discovery (redirect) + public APIs behind Nginx (proxy) Traffic inspection, TLS termination
Use flux redirect mode for internal service discovery (no overhead). Switch proxy mode when you expose flux behind Nginx with HTTPS. One binary, two modes.