Failover
A service can stay reachable when the agent in front of it goes offline. There are two forms: a single host whose Asset is backed up by a Virtual Asset with the same DNS name, and a whole network published as the same Subnet on two gateway assets.
In short
One host: give the primary Asset and a Virtual Asset (on a gateway asset in the same network) the same DNS name and grant both in the same policy. While the primary Asset is offline, its name points only to the Virtual Asset. A network: create the same Subnet on two gateway assets and grant both; each client uses one of them, and moves to the other if its gateway goes offline. Both protect against an offline agent, not against a failed service.
How it works
Failover follows the Online status of the assets, as the Admin Console shows it. A client only gets a name and a route for a destination while the asset that provides it is online. When an asset goes offline, the server takes its entries out of the configuration of every client, and what is left is the other path.
With the default settings of XplicitTrust, an asset counts as offline about 30 seconds after its last heartbeat; the clients get the changed configuration shortly after. Connections that were open through the asset that went offline break and have to be opened again.
Because the switch follows the status, an asset that is online but cannot reach the service (a LAN outage behind it, a stopped service) does not trigger it.
One host: an Asset and a Virtual Asset with the same name
- The primary Asset runs the agent on the service host and serves the service directly.
- A gateway asset in the same network provides a Virtual Asset that points to the same service, by the host's local IP or to a standby host.
- Both have the same DNS name in the Admin Console, and the same policy grants both.
While both are online, the client's hosts file has the shared name with both addresses. Which of them a program uses is up to the operating system; XplicitTrust does not prefer the primary. Both paths can therefore carry traffic, which also shows early when one of them is broken.
When the primary Asset goes offline, its address is removed and the name resolves only to the Virtual Asset. When it is back online, its address comes back.
What this protects against
It keeps the service reachable when the primary Asset goes offline while the service itself still runs, for example:
- The agent on the primary host crashes or is stopped.
- The primary host loses its internet connection and the agent can no longer reach the XplicitTrust infrastructure, while the host is still reachable on the LAN.
The gateway asset sits in the same LAN as the service and reaches it by its local IP, so clients still get through.
It does not protect against what takes the service down: the service crashing, the host rebooting or going offline, or a LAN outage between the gateway asset and the service. To cover a failed host too, point the Virtual Asset at a standby host that runs the same service.
Topology
- Primary Asset:
app.internal, the agent on the service host itself. - Gateway asset: a Linux or Windows asset in the same network segment as the service.
- Virtual Asset:
app.internal, on the gateway asset, with its address set to the service's local IP (or the IP of a standby host).
Several gateway assets
The same service can be reachable through more than one gateway asset, with a Virtual Asset with the same DNS name on each.
Each online gateway asset adds an address for the shared name; one that goes offline drops out. This helps when the gateway assets sit in different network segments or sites, so that one gateway outage does not take the failover path down too.
A network: the same Subnet on two gateway assets
A whole network can be made redundant without a shared DNS name: create the same Subnet range on two gateway assets in that network and grant both. Each client then uses one of the two gateways for that range. The choice is fixed per client and range (a hash of the client's tunnel address, the range and the gateway), so clients are spread over both gateways and both carry traffic. When a gateway goes offline, only the clients that used it move to the other one; connections they had open through it break and have to be opened again. When it is back, those clients return to it.
The steps are in Make a subnet highly available.
Policies
The primary Asset and the Virtual Asset are two separate destinations for policies, even with the same DNS name: the name is not a policy-level alias. Every policy that grants the primary Asset must also grant the Virtual Asset, and the other way round. A client that is granted only one of them gets only one address for the name, and there is nothing to fall over to.
The same holds for two Subnets: grant both in the same policies.
The simplest approach is to add both as destinations of the same policy.
Notes
- The primary Asset and the Virtual Asset must share every DNS name on which failover should apply.
- The gateway asset must reach the service's IP directly (usually the same LAN).
See also
- Concept: Gateway Assets, Services and Policies, Names and DNS
- Guide: Make a subnet highly available, Reach a printer, NAS or camera
- Reference: Assets, Gateway objects