Skip to content

mqp2p heartbeat-ttl presence: review follow-ups #29

Open

Description

@fabracht

Out-of-scope items surfaced during the PR #28 review and quorum verification. None are defects in that change; all are tracked here for later.

  1. srflx/public_addr is a one-time snapshot. STUN runs only in Peer::new and the heartbeat re-create reuses the address captured at registration time. If the NAT mapping rebinds mid-session, the advertised WAN address goes stale and nothing re-discovers it. update_peer_addr exists but is never called in the running loop. Pre-existing (STUN always ran once); broader than the re-create path the PR fixed.

  2. Re-create resets MQDB _version to 1. A reaped-then-recreated peer reappears at version 1 rather than continuing to increment. Nothing in this feature reads _version; only matters to an external consumer relying on version monotonicity.

  3. list_peers fetches all $DB/peers rows and filters by _expires_at client-side rather than using a broker-side filter. Correct at current scale, but a churn-scalability improvement. Related: the broker TTL sweep interval is ~60s while the lease is 15s, so dead rows linger server-side and the client-side filter is load-bearing for timely discovery (which is also why the cross-machine clock-skew caveat matters operationally).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions