libp2p / js-libp2p-kad-dht

JavaScript implementation of the DHT for libp2p
https://libp2p.io
Other
141 stars 60 forks source link

Peer eviction strategy #230

Open achingbrain opened 2 years ago

achingbrain commented 2 years ago

JS does not favor long lived peers.

  1. We need to implement ping. When a useful peer becomes known, we add it to the routing table if there is room. If there is not room, we should NOT evict peers without pinging/dialling them.
  2. Useful peers are those that have successfully responded to a query.
achingbrain commented 2 years ago
  1. is implemented by https://github.com/libp2p/js-libp2p-kad-dht/pull/229
SgtPooki commented 1 year ago

@achingbrain looks like we can close this?

achingbrain commented 1 year ago

I don't think the second part has been done yet - adding some metadata to the routing table that says a peer has responded to a query.