40 lines
1.7 KiB
Markdown
40 lines
1.7 KiB
Markdown
# ECP-0073: Archive Relay Affinity Override
|
|
|
|
Status: Implemented
|
|
|
|
## Context
|
|
|
|
`wt-archive` workers discover streams from `/api/public-streams` and subscribe to the listed `relay_url`. In practice, `cdn.moq.dev` resolves to region-local relay IPs, and broadcasts published from one region are not consistently visible from another region endpoint.
|
|
|
|
For archive nodes running in a different region than publishers, this causes workers to connect successfully but wait indefinitely for broadcast announcements.
|
|
|
|
## Decision
|
|
|
|
Add an explicit Nix module option:
|
|
|
|
- `services.every-channel.ec-node.archive.relayUrlOverride` (nullable string)
|
|
|
|
When set, archive workers ignore per-entry `relay_url` from directory listings and always subscribe through the configured override URL.
|
|
|
|
This allows operators to pin archive ingestion to the same relay endpoint used by publishers without changing public directory payloads.
|
|
|
|
## Why
|
|
|
|
- Restores deterministic archival ingestion across regions.
|
|
- Keeps deployment-level control in Nix (no app-level migration needed).
|
|
- Reversible with a single config change.
|
|
|
|
## Alternatives considered
|
|
|
|
- Keep subscribing to directory-provided `relay_url` only. Rejected because cross-region visibility is inconsistent in practice.
|
|
- Rewrite directory entries per-region. Rejected because this mixes deployment affinity into public directory payloads.
|
|
|
|
## Rollout
|
|
|
|
1. Set `archive.relayUrlOverride` on archive hosts that need relay affinity.
|
|
2. If override uses an IP literal, enable `archive.tlsDisableVerify = true` until SNI-preserving IP overrides are implemented.
|
|
3. Rebuild host and verify manifest growth.
|
|
|
|
## Reversibility
|
|
|
|
Unset `archive.relayUrlOverride` to return to directory-provided `relay_url` behavior.
|