TurboFabric path model
TurboFabric picks one path per peer pair. Selection is ranked: direct first, then datacenter network gateways, then relay only when explicitly permitted. A datacenter network gateway is a routed peer — not the same class as an unrelated relay.
What a datacenter network is — a logical routing domain a server may belong to
several of, with a priority and a trusted flag — lives on Datacenter
networks. This page assumes it.
The control plane stamps diagnostics-only paths[] on each GET fabric relay
(peerServerId, selected, optional endpoint / viaServerId /
lastHandshakeAt / latencyMs, degraded). That summary is never hashed into
desired reconcile state.
Which Pairs Get a Tunnel
Before any of the path states below apply, the control plane decides whether a pair of servers needs a tunnel at all:
- Shared trusted datacenter network — no tunnel. All traffic between the two servers stays on that LAN, even when TurboFabric is off for the organization or paused. Cross-server container networks among such servers need no tunnel and no TurboFabric, but only when the trusted network has IPv4 addresses for both servers; on an IPv6-only trusted network the pair keeps a tunnel, so TurboFabric must be on. A server whose TurboFabric switch is off can still hold networks whose other servers all share its trusted LAN, but nothing that needs a tunnel.
- Shared network marked untrusted — a TurboFabric tunnel that runs over that LAN, encrypted. Plaintext never crosses an untrusted LAN.
- Different datacenter networks — a TurboFabric tunnel.
- Older daemon — when either server of a trusted pair runs an older daemon, the pair falls back to a tunnel over the LAN.
| What Rides the Trusted LAN | What Rides TurboFabric | What Never Uses TurboFabric |
|---|---|---|
| Everything between two servers that share a trusted datacenter network: databases, app-to-database connections, cross-server container networks | Traffic between datacenter networks, and traffic over a shared network marked untrusted (the tunnel runs over that LAN) | Database failover replication and the failover coordinator: trusted LAN only |
Managed database connections try a trusted LAN first, then a healthy TurboFabric tunnel, then the public address. The address ladder counts a TurboFabric address only when the tunnel is healthy right now: a live reading with a recent handshake. A down tunnel is skipped, and traffic falls back to the public address, then to a datacenter network that is currently down.
A cross-server container network whose servers all share a trusted LAN
deploys with TurboFabric off. A mixed network, with some servers in another
datacenter network, needs TurboFabric on and is refused otherwise
(turbofabric_required); the message names the servers.
Changing a datacenter network's trust, a server's datacenter network membership, or a
server's TurboFabric switch re-plans the paths. No reboot is needed. While
TurboFabric is off, a change that would turn a LAN pair holding a running
cross-server container network into one that needs a tunnel is refused with
409 and a message naming the networks: marking the shared network
untrusted, or a server leaving it. A daemon that loses the LAN feature is not
refused: with TurboFabric off, that pair loses its LAN routes and needs
TurboFabric.
Removing TurboFabric completely keeps the cross-server container networks whose servers all share a trusted LAN, since they never needed it.
Where to See a Pair's Path
The organization's TurboFabric page shows each server pair's path with a one-sentence reason: LAN, TurboFabric, TurboFabric over LAN or No Path. A server's Network tab shows how that server reaches each other server.
GET /api/client/v1/organizations/{id}/fabric returns the same plan as an
optional pairs array of { fromServerId, toServerId, path, reason }, where
path is lan, fabric, fabric_over_untrusted_lan or none. The field is
absent when the organization has fewer than two servers. See the Control
plane API for the full response.
pairs[].path is the planned transport between two servers. The six states
below describe only pairs that have a tunnel, so a trusted-LAN pair never
appears in paths[].
Six path states
selected | Meaning |
|---|---|
direct_lan | Tunnel endpoint on a shared LAN address: over an untrusted shared network, or a trusted pair that fell back because a daemon is older |
direct_public | Public endpoint on the peer |
direct_nat | NAT rendezvous after kernel-observed endpoints |
gateway | Routed via a datacenter network gateway (viaServerId) |
relay | Degraded fallback through an unrelated relay — always degraded |
unreachable | No viable path (no latency) |
Selection contract
- Prefer a healthy direct path (
direct_lan, thendirect_public).direct_lanonly considers datacenter networks both peers are pinned into; when there is more than one, they are tried in(priority asc, id asc)order. A pair that shares a trusted datacenter network has no tunnel at all (see Which Pairs Get a Tunnel) unless a daemon is older; a pair that shares only an untrusted one tunnels over it. - Try NAT direct (
direct_nat) when a public/LAN endpoint is not enough. NAT rendezvous is already implemented in the control plane (turbopanel/src/features/fabric/rendezvous.ts) and applied on the daemon with kernel-only probes (wg set … endpoint+wg show dump— never a userspace STUN socket). Arbitrary symmetric NAT is not guaranteed to punch. - Fall back to a datacenter network gateway (
gateway) — typically leaf → gateway → gateway → leaf across sites. Thetrustedflag and the same(priority asc, id asc)ordering decide which of a leaf's datacenter networks supplies its gateway when it belongs to several. - Use relay only when org (and relay)
allowRelaypermits it. - Otherwise the pair is unreachable.
allowRelay policy
- Organization
allowRelaydefaults false (opt-in / degraded). PUT/organizations/:id/fabricmay set it alongsideenabled. - Relay
allowRelayisnull(inherit org),true, orfalse. A relay may only tighten org policy: effective =orgAllowRelay AND (relayAllowRelay ?? true). A relay cannot turn relay on when the org has it off. - GET fabric returns both the stored override and
effectiveAllowRelay. preferredGatewayIdsmust reference gateway-role relays in the same fabric (422preferred_gateway_invalidotherwise).
Relay copy in the app: Relay is a degraded fallback path and must be explicitly enabled. A datacenter network gateway is not the same as an unrelated relay.
Switched-off servers and server roles
A server whose TurboFabric switch is off is not a peer of anything, so no
tunnel path is ever computed to or from it. A pair that shares a trusted
datacenter network still reaches each other over the LAN, so a switched-off
server can still hold networks whose other servers all share its trusted LAN,
but nothing that needs a tunnel. Each server also carries a role, Gateway
(accepts connections; has a public or forwarded address) or Client (only
connects out), automatic by default. The role is saved and shown but is not
an input to path selection yet. It is separate from the gateway relay role
used in step 3 of the selection contract. See The TurboFabric
mesh.
Related
Last updated on
Datacenter networks
A datacenter network is a routing domain inside a datacenter, not the building — priority and trust, the local → datacenter network → fabric → public ladder, the CIDR collision matrix, reserved ranges, and why TurboPanel never configures a host interface
Storage architecture
How TurboPanel classifies its four storage workloads, which backend serves each on TurboPanel High Availability and self-hosted, and why keyed objects, relational rows, and time-bucketed analytics are deliberately not unified