Skip to content

Implement sharding by key hash across a cluster of nodes, with a coordinator for routing #41

@AlexJuca

Description

@AlexJuca

Context

To scale beyond one node, FKVS needs deterministic routing of keys to nodes. This issue focuses on sharding keys by hash and routing requests through a coordinator or equivalent routing layer.

Related: #28 tracks the broader cluster capability.

Scope

  • Choose sharding algorithm: simple modulo, consistent hashing, or another scheme.
  • Define coordinator responsibilities and failure behavior.
  • Route single-key commands (GET, SET, DEL, TTL/integer commands) to the correct shard.
  • Define behavior for resharding and data movement.
  • Decide how clients discover coordinator/shard topology.

Acceptance criteria

  • Given the same cluster topology, a key maps deterministically to the same node.
  • Requests are routed to the owning shard correctly.
  • Adding/removing a node has documented data movement behavior.
  • Tests cover routing correctness and at least one topology change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions