You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ROBUSTNESS.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,28 +40,26 @@ ours, they're the parts that *must* be made robust by hand.
40
40
41
41
### What's there
42
42
43
-
- one public-IP host running `coturn` (STUN+TURN UDP/TCP) and a Go HTTP
44
-
signalling broker
43
+
- one public-IP host running STUNand a Go HTTP signalling broker; a
44
+
self-hosted coordinator may also enable TURN relay fallback
45
45
- the dstack CVMs themselves, which sit behind Phala's provider NAT
46
46
47
47
### What can break
48
48
49
49
| failure | impact | recovery |
50
50
| --- | --- | --- |
51
51
| Coordinator host dies | New peers can't bootstrap. **Existing ICE pairs keep working** (no data flows through this box once handshake is done). New retries from existing peers fail until it's back. | bring it back; peers reconnect on their own. |
52
-
| Coordinator ufw / network change | Same as above. | restore ports 3478/udp+tcp, 5349/tcp, 7000/tcp, 49152-49999/udp. |
53
-
| TURN shared secret leaks |Anyone can use the box as an open TURN relay (cost / abuse risk). | rotate `TURN_SHARED_SECRET` in coordinator + every CVM env, redeploy. |
52
+
| Coordinator firewall / network change | Same as above. | restore the signaling and STUN ports; if self-hosted TURN is enabled, also restore the TURN relay port range. |
53
+
| TURN shared secret leaks |Applies only when self-hosted TURN is enabled. Anyone with the secret can use that box as a relay.| rotate `TURN_SHARED_SECRET` in coordinator + every CVM env, redeploy. |
54
54
| Signalling broker is unauthenticated | Any external actor can publish/poll messages, spoof candidates, intercept ICE handshakes. Currently low-impact only because we're solo. | gate `/publish` + `/poll` on attestation-derived identity. |
55
-
| dstack provider NAT changes type (e.g. cone → symmetric) |ICE picks TURN relay path. ~150 ms RTT instead of ~6 ms. **Functionality unchanged.**|none needed; coturn covers this fallback. |
55
+
| dstack provider NAT changes type (e.g. cone to symmetric) |With the public STUN-only demo endpoint, direct connection may fail instead of relaying. With self-hosted TURN enabled, ICE can pick the relay path.|use self-hosted TURN or a future credentialed relay service for environments that need relay fallback. |
56
56
| Underlying CVM dies | That peer's services drop out. Consul will mark it `failed` after gossip timeout, Envoy LB removes it within seconds. | redeploy; the rest of the cluster is unaffected. |
57
57
58
58
### Risk shape
59
59
60
-
Coordinator host is a **single point of failure for NEW joins** and
61
-
a SPOF for the TURN-relay fallback path. It is **NOT a SPOF for
62
-
established traffic** — established peers ICE-direct and don't
63
-
touch it. So dying coordinator = "no new peers can join, and any pair
64
-
whose direct path goes down can't fail over to TURN until it's back".
60
+
Coordinator host is a **single point of failure for NEW joins**. If
61
+
self-hosted TURN is enabled, it is also a SPOF for the relay fallback
62
+
path. It is **NOT a SPOF for established direct traffic**.
65
63
66
64
### Recommended fixes
67
65
@@ -348,10 +346,11 @@ service_healthy } }` would silence them entirely.
348
346
349
347
### Time drift
350
348
351
-
TURN credentials are time-bound (1-hour TTL in our derivation). If a
352
-
CVM clock drifts more than ~minutes from the coordinator's, TURN auth
353
-
fails. dstack CVMs run NTP so this isn't a real concern, but worth
354
-
noting for the runbook.
349
+
TURN credentials are used only when self-hosted TURN fallback is
350
+
enabled. They are time-bound (1-hour TTL in our derivation). If a CVM
351
+
clock drifts more than a few minutes from the coordinator's, TURN auth
352
+
fails. dstack CVMs run NTP so this is not a real concern, but worth
0 commit comments