Skip to content

FR: network-change signal API #56

Description

@passcod

🤖 Browsers detect network changes (interface up/down, Wi-Fi→cellular) and react: flush the connection pool and DNS cache, and re-evaluate "QUIC is broken" per network — a path that was broken on the office network may be fine on the new one.

Node has no good portable signal for this, so fáith can't detect it — but it doesn't have to. Expose the reaction as an API and let the developer wire up their own signal (systemd-networkd events, netlink, a health check, a k8s lifecycle hook):

agent.networkChanged();

Effects, roughly: drop pooled connections, flush the DNS cache, clear the Alt-Svc failed/slow states (and reset any backoff from #47) so HTTP/3 gets re-probed on the new network, and reset path-time EWMAs (#45 follow-on) since they describe the old path.

Some of these are per-subsystem resets that mostly exist already; the work is plumbing them into one coherent verb and documenting what it does and doesn't promise (in-flight requests are not interrupted, etc).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions