Problem
The relay is correctly payload-free (wake/fallback only) and DCUtR upgrades relayed→direct, but there is no telemetry on relay byte usage and nothing actively prefers/confirms the direct path once it exists. The "closer-peer-first" principle is implicit in libp2p connection racing, not measured or enforced — so relay cost is uncontrolled and invisible.
Proposed approach (Phase 0 telemetry → Phase 1 enforcement)
Adopt the Tailscale DERP discipline:
- Meter relay vs direct bytes; expose a "% traffic over relay" gauge via
NetworkEvent/diagnostics.
- Once a DCUtR direct path is up, demote/detach the relay path for data so steady-state traffic leaves the relay.
- Surface per-peer path (direct/relayed) for observability.
"You can't optimize what you don't measure" — the telemetry is the cheap prerequisite.
Files
wavesyncdb/src/diagnostics.rs, push.rs, peer_manager.rs, relay_manager.rs, behaviour.rs.
Ref: docs/research/sync-reliability.md §5 (DERP model) + §6 P1.
Problem
The relay is correctly payload-free (wake/fallback only) and DCUtR upgrades relayed→direct, but there is no telemetry on relay byte usage and nothing actively prefers/confirms the direct path once it exists. The "closer-peer-first" principle is implicit in libp2p connection racing, not measured or enforced — so relay cost is uncontrolled and invisible.
Proposed approach (Phase 0 telemetry → Phase 1 enforcement)
Adopt the Tailscale DERP discipline:
NetworkEvent/diagnostics."You can't optimize what you don't measure" — the telemetry is the cheap prerequisite.
Files
wavesyncdb/src/diagnostics.rs,push.rs,peer_manager.rs,relay_manager.rs,behaviour.rs.Ref:
docs/research/sync-reliability.md§5 (DERP model) + §6 P1.