Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ipfs/go-bitswap] Remove unresponsive peers from Sessions #125

Open
dirkmc opened this issue Feb 14, 2020 · 0 comments
Open

[ipfs/go-bitswap] Remove unresponsive peers from Sessions #125

dirkmc opened this issue Feb 14, 2020 · 0 comments

Comments

@dirkmc
Copy link
Contributor

dirkmc commented Feb 14, 2020

If a peer doesn't respond to any request for some time, we should remove the peer from all Sessions.

Proposal:

  • For each peer, PeerManager keeps track of
    • the last time a want was sent to the peer
    • the last time the peer responded with HAVE / DONT_HAVE / block
  • PeerManager has a ticker that periodically checks each peer to see if the delta exceeds a timeout
    • if so it signals to all sessions that are interested in the peer that the peer is no longer available
  • if a Session receives DONT_HAVE from all available peers it will broadcast want-have to all connected peers (including those that are not in the Session). If the peer is alive it may respond and be added back into the Session.

Depends on ipfs/go-bitswap#259

@Jorropo Jorropo changed the title Remove unresponsive peers from Sessions [ipfs/go-bitswap] Remove unresponsive peers from Sessions Jan 27, 2023
@Jorropo Jorropo transferred this issue from ipfs/go-bitswap Jan 27, 2023
Jorropo pushed a commit to ipfs/go-libipfs-rapide that referenced this issue Mar 23, 2023
@aschmahmann aschmahmann reopened this Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants