TurboFabric path model
TurboFabric picks one path per peer pair. Selection is ranked: direct first, then datacenter gateways, then relay only when explicitly permitted. A datacenter gateway is a routed peer — not the same class as an unrelated relay.
What a datacenter 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.
Six path states
selected | Meaning |
|---|---|
direct_lan | Same-site / private LAN endpoint in a trusted shared datacenter |
direct_public | Public endpoint on the peer |
direct_nat | NAT rendezvous after kernel-observed endpoints |
gateway | Routed via a datacenter 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 datacenters both peers are pinned into and that are markedtrusted; when there is more than one, they are tried in(priority asc, id asc)order. An untrusted shared datacenter is skipped as if the pair did not share 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/lib/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 gateway (
gateway) — typically leaf → gateway → gateway → leaf across sites. The same trust filter and(priority asc, id asc)ordering decide which of a leaf's datacenters 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 console: Relay is a degraded fallback path and must be explicitly enabled. A datacenter gateway is not the same as an unrelated relay.
Related
Last updated on
Datacenter networks
A datacenter is a logical routing domain — priority and trust, the local → datacenter → 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