Design: Consistent Hashing System
Design the consistent hashing mechanism and its integration with nodes for key distribution. Out of scope: detailed node internals, network protocols, and client-side caching.
Functional Requirements
FR1: Distribute keys evenly across multiple nodes (servers).
FR2: Minimize key remapping when nodes are added or removed.
FR3: Support dynamic scaling of nodes without major data reshuffling.
FR4: Handle node failures gracefully with minimal impact on key distribution.
FR5: Provide a way to locate the node responsible for a given key efficiently.
Non-Functional Requirements
NFR1: System should handle up to 10,000 nodes.
NFR2: Key lookup latency should be under 5 milliseconds.
NFR3: System availability target is 99.9% uptime.
NFR4: Memory usage per node should be optimized to handle millions of keys.