Features
Services
Give an internal app one name and address, run it on several machines, and let devices move to a backup on their own.
A service is an internal app with its own name and address, separate from any one machine. You run it on one or more machines (its hosts), and every device reaches it by the service's name. If the host in use goes offline, devices move to the next one.
Use it for anything people rely on every day: a wiki, Grafana, an admin tool, a Git server. Services work over TCP.
Set one up
Create the service. In the dashboard, open Services and add one with a name (like
grafana) and its ports (liketcp:443). It gets an address from100.100.0.0/16and a name.Run it on each host. On every machine that runs the app, tell the client which local port to send the service's traffic to:
bashunderpass serve --service=svc:grafana --tcp=443 127.0.0.1:3000The target can be a port (
3000),127.0.0.1:3000orlocalhost:3000.Approve the hosts. In Services, approve each machine. A machine only serves once an admin approves it.
People then open https://grafana (or the service's full name) from any device in the network.
Which host is used
Every device picks the same host, so everyone sees the same app state:
- Hosts that are approved and currently serving are candidates.
- Online hosts come first, then the one that has served the longest.
- Each device uses the first candidate it can reach.
This is failover, not load balancing: one host serves at a time, and the others wait as backups.
Failover timing
| What happens | When devices move |
|---|---|
You stop serving on a host (serve … off) | Right away |
| A host loses power or its network | After about 90 seconds, when it counts as offline |
For planned maintenance, stop serving first:
underpass serve --service=svc:grafana --tcp=443 offThen update or restart the machine, and run the serve command again.
See what a machine serves
underpass serve statusLimits
- 1 to 16 ports per service, TCP only
- Up to 64 services per host
- Service and machine names share one namespace: a service can't have the same name as a machine
Access
Only devices in your network can reach a service. To narrow it further, name it in an access rule as svc:grafana.