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

peer address evitction #465

Closed
jbenet opened this issue Dec 20, 2014 · 3 comments
Closed

peer address evitction #465

jbenet opened this issue Dec 20, 2014 · 3 comments
Assignees
Milestone

Comments

@jbenet
Copy link
Member

jbenet commented Dec 20, 2014

currently we store a peer's addresses indefinitely. As of peer-restrict the peerstore will track these addresses, so it will be easier. Make sure everything uses the peerstore for its view on a peer's addresses (routing adds addresses to the peerstore directly. Then we can figure out how to determine a peer's addresses are stale.

This raises a larger question of address staleness on the routing system. Currently, provider records stored on the dht have a peer's address, which is a huge optimization that reduces query RTT count. This might need to be relaxed in the future to either:

  • return those addresses with a measure of staleness (when it was received)
  • prune out stale addresses. the requestor can fall back to FindPeer.
    (i'm reminded of skype's use of centralized trackers to find everyone, which greatly simplifies the problem, but we can't do in the long run).

This -- along with the notion of IPNS record validity -- makes me think the routing system in general should use validity for all its records (names, providers, peer info). So perhaps this problem can be greatly simplified by forcing that all values put carry a validity. Provider records and Address records need not share the same validity time. And nodes can then simply return any valid address records for GetProviders queries they receive (this is the exact analogue of a DNS glue record).

@jbenet
Copy link
Member Author

jbenet commented Jan 15, 2015

This contributes to #573

@jbenet jbenet added this to the α milestone Jan 15, 2015
@jbenet jbenet self-assigned this Jan 15, 2015
@jbenet
Copy link
Member Author

jbenet commented Jan 20, 2015

Related #603

@jbenet
Copy link
Member Author

jbenet commented Jan 23, 2015

The addr explosion has been mitigated by:

  • removing incorrect AddAddresses(.)
  • peers now only take observed addrs which match a listen port (was incorrect before)
  • introduction of https://github.com/jbenet/go-reuseport which substantially reduces the addresses peers see.

The larger problem will be addressed in #603

@jbenet jbenet closed this as completed Jan 23, 2015
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

No branches or pull requests

1 participant