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

Connection Closing #45

Closed
whyrusleeping opened this issue Apr 28, 2016 · 6 comments
Closed

Connection Closing #45

whyrusleeping opened this issue Apr 28, 2016 · 6 comments
Assignees
Labels
help wanted Seeking public contribution on this issue need/community-input Needs input from the wider community status/ready Ready to be worked

Comments

@whyrusleeping
Copy link
Contributor

we need to decide how to choose when to disconnect from a given peer. Right now, we never disconnect after making a connection unless that connection gets dropped.

@whyrusleeping whyrusleeping added this to the Connection Closing milestone Sep 13, 2016
@whyrusleeping whyrusleeping added the need/community-input Needs input from the wider community label Sep 13, 2016
@whyrusleeping whyrusleeping added the help wanted Seeking public contribution on this issue label Sep 14, 2016
@jbenet
Copy link
Contributor

jbenet commented Sep 15, 2016

We'll want something like this. take this with a grain of salt:

  • swarm lets each protocol register a value per peer, one of {Active, Passive}
    • Active = keep conn open
    • Passive = i'll use conn if it's open but don't keep it open on my behalf
  • If all passive, swarm disconnects.
  • The value can be passed in to Connect or Dial too.

When active:

  • bitswap: when peers are known to have what we want (get providers, or recent activity)
  • dht: routing table peers are active
  • pubsub: active while subscriptions are shared
  • ping: active while pinging

@ghost
Copy link

ghost commented Sep 15, 2016

Sounds good to me on first sight

lets each protocol register a value per peer

but this I'd invert, protocols don't need to be aware of the swarm. the swarm can just ask them whether they're still interested in the connection for a given peerid. this way you end up with only one control flow for this.

@ghost ghost assigned jbenet, daviddias, whyrusleeping and Kubuxu and unassigned ghost , jbenet, daviddias, whyrusleeping and Kubuxu Nov 2, 2016
@ghost ghost added status/deferred Conscious decision to pause or backlog and removed status/deferred Conscious decision to pause or backlog labels Nov 12, 2016
@Kubuxu Kubuxu added the status/ready Ready to be worked label Nov 28, 2016
@daviddias daviddias changed the title closing connections to peers Connection Closing Aug 19, 2017
@daviddias
Copy link
Member

@whyrusleeping do you still have the notes from last lab week (I wrote them in paper and I believe we also opened a issue, trying to find it)

@davidak
Copy link

davidak commented May 5, 2018

I think we want a healthy and efficient network. So we need connections with low latency but also some with good connections to the whole network, so we can find the data we want. We probably should at least know every peer in the local network, so we can ask them if they have the data we want before asking peers on the internet.

@thomas92911
Copy link

#474

@anacrolix
Copy link
Contributor

I think there was a lot of discussion of connection pruning recently, I can't find anything on GitHub that reflects some of the talking points though.

marten-seemann pushed a commit that referenced this issue Dec 20, 2021
Limiting autonat service responses/startup
marten-seemann pushed a commit that referenced this issue Apr 19, 2022
subscribe connmgr to net notifications
marten-seemann pushed a commit that referenced this issue Apr 21, 2022
nil out references to finished dials
marten-seemann pushed a commit that referenced this issue Apr 26, 2022
use the ipnet.PSK instead of the ipnet.Protector for private networks
marten-seemann pushed a commit that referenced this issue Aug 9, 2022
marten-seemann pushed a commit that referenced this issue Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Seeking public contribution on this issue need/community-input Needs input from the wider community status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

8 participants