-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
Description
Resilience to node outage for Put requests is actually quite simple.
On the client side:
- If a Put request fails due to a
no_nodeerror or a connection error, the client picks another node (using some deterministic algorithm) and sends the record there. (Possibly repeating, if multiple nodes are out.) - Ditto for Get requests.
On the node side:
- The node has a full DHT client, and loads the standard
.nodesfile at startup, connecting to all other nodes. - The node keeps a separate store of "orphan records" (i.e. records that do not fall under its normal hash range and are being temporarily kept for another node).
- Any records that are Put that are outside the node's hash range are placed in the store of orphaned records.
- Get requests that are outside the node's hash range are looked up in the store of orphaned records.
- Periodically, the node iterates over the store of orphaned records and tries to send them to the correct node, using normal Put requests. On success, a record is removed from the store of orphaned records. On failure, it stays there until the next forwarding period.
Reactions are currently unavailable