Replies: 2 comments
-
If you are using a public DHT I believe you're going to be "stuck" with the expiry configuration of other nodes. If you are deploying to your own DHT you can tune the expiry to match the liveness you want, though make sure you also tune down your re-publish interval to give nodes several attempts to successfully republish before the record expires. |
Beta Was this translation helpful? Give feedback.
-
If you really need to have records removed and these are nodes that are within your network (and thus your own protocol(s)) you could use a separate signaling to notify the nodes to remove such records. Eg, you could send a signed message from one node to the network via pubsub to remove the record, though do know that any nodes thats connected to any of the other DHT nodes that dont conform to your specific notification may not honor or respect that. This would then come down to just setting your configuration for DHT so that the record can expire in a short amount of time. |
Beta Was this translation helpful? Give feedback.
-
I'm looking to remove a key from the kademlia DHT, however I'm not sure on the best way to do this.
Two options I see are:
.remove_record
: this seems to only remove the record from the local store, and not across peers in the DHT..put_record
: this seems like an option, however I found a PR which seems to make this a no-op? protocols/kad: Do not attempt to store expired record in record store #1496Is there a better way to remove a record from peers in the kademlia DHT?
Edit: I just read deeper into
remove_record
and saw this note:I guess remove record is my solution here, however it seems like the default publication time is 24 hours, meaning the record would still exist across peers for up to 24 hours after being deleted?
Beta Was this translation helpful? Give feedback.
All reactions