-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
From what I understand from #2025 (reply in thread) the Kademlia implementation does not support client mode. Client mode is quite useful as it allows lower quality (e.g. intermittent availability, high latency, low bandwidth, low CPU/RAM/Storage, etc.) nodes to utilize the DHT for discovery without decreasing the quality of the network.
This feature has been very helpful in go-libp2p and in the various consumers of it such as go-ipfs.
To implement client mode all that is really required is that the node does not advertise the DHT protocol (e.g. /ipfs/kad/1.0.0
). Additionally, if the node is able to switch between client and server mode at runtime then updates to the supported protocols should be communicated via identify-push
/identify-delta
.
Once we have the basic client-server mode switching then as a follow up it might be a good idea to, as go-libp2p does, have an "automatic" mode that switches between client and server mode based on educated guessing about what is appropriate for the user (e.g. peers behind relays probably shouldn't be servers, and peers who haven't been online for a while and are stable probably shouldn't either).