Repository navigation
add heartbeat-ttl presence to mqp2p peer discovery - #28
Merged
Merged
Conversation
| PeerConfig::new("observer", &broker_addr) | ||
| .with_bind_addr(bind_addr) | ||
| .without_stun() | ||
| .with_credentials("testuser", "testpass") |
| PeerConfig::new("ephemeral", &broker_addr) | ||
| .with_bind_addr(bind_addr) | ||
| .without_stun() | ||
| .with_credentials("testuser", "testpass") |
| PeerConfig::new("resilient", &broker_addr) | ||
| .with_bind_addr(bind_addr) | ||
| .without_stun() | ||
| .with_credentials("testuser", "testpass") |
…oor, stop heartbeat leak
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Peers now maintain presence through a lease rather than lingering as stale
onlineentries.Mechanism
register_peerwrites MQDB's_expires_at(now + lease) and assigns a stable self-chosen record id.lease/3s via$DB/peers/{id}/update; on a failed renew it re-creates the record under the same id, so a peer reaped during an outage longer than MQDB's sweep resurrects without a new id or discovery churn.list_peersfilters peers whose lease has lapsed, so discovery reflects liveness ahead of the physical sweep.PeerConfig::with_lease_secs(default 15s); the task is aborted onshutdown/Drop.Tests
_expires_atserde round-trip).mqdbintegration tests: file transfer, lease-expiry (dead peer drops from discovery while a live peer stays), and resurrection (record deleted out-of-band, peer re-creates it).$DBround-trip readiness probe to the integration harness so parallel broker startups are not flaky.mqp2p 0.1.0 -> 0.2.0;
stitch-p2pandstitch-tasksversion requirements updated to match.