feat(odoh): accept multiple relay/target entries for rotation + failover #140
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Today
[upstream]formode = "odoh"takes a singlerelayand a singletarget:This was raised in #138 - the natural extension to pools is not supported:
The single-endpoint shape is fine for correctness but costs on two axes:
strictmode, or a silent privacy downgrade tofallbackin non-strict mode.RFC 9230 itself doesn't mandate 1:1 — the protocol is happy to carry any
(relay, target)pair the client picks per query.Proposed shape
Accept
string | [string]for bothrelayandtarget, mirroring the existingaddress/fallbackpattern inUpstreamConfig(seesrc/config.rs:166-173, thestring_or_vecdeserializer):Selection policy:
addressarray behavior. Fastest healthy entry wins; dead entries get deprioritized.(relay, target)pairs sharing an eTLD+1, but only reject configs where no valid pair exists.Open questions
Independent pools vs. explicit pairs. Independent pools (any relay × any target) are simpler to configure but may pick pairs the user doesn't trust (e.g., two US-based operators). An explicit
[[odoh.routes]]table{ relay, target }sidesteps this at the cost of verbosity.Bootstrap IP pinning (
relay_ip/target_ip). These are single-valued today. With arrays, options are (a) per-URL map{ "https://..." = "1.2.3.4" }, or (b) drop the per-URL pinning and require users who want pinning to use single-endpoint configs. Leaning (a) since pinning is the only way to keep the ODoH endpoint names off the bootstrap resolver — privacy-critical for recursive-self-resolver setups (seedocs/implementation/bootstrap-resolver.md).Failure semantics in
strict = true. Does "relay failure" mean a single pair failed, or the whole pool is exhausted? I'd argue exhausted - a single 5xx from one relay shouldn't kill the query if another relay is healthy.