Chord is based on consistent hashing, which assigns hash keys to nodes in a way that doesn't need to change much as nodes join and leave the system. A full description of Chord is given in the paper by Stoica et al., but description given here should be sufficient for your design problem.