Skip to content

Node fallback for Put requests #187

@gavin-norman-sociomantic

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_node error 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 .nodes file 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions