2

Our project needs a distributed extensible no-sql database. Each data record must be stored in several data servers (a master and some slaver)for safety.

We hope the system could add or reduce server dynamically without lose any data record. Are there any algorithms with the same function of consistent hash?

user
  • 86,916
  • 18
  • 197
  • 190
user1803467
  • 125
  • 2
  • 10

1 Answers1

0

If I were you, I would use sha1 hashing algorithm as a key to your data. So far, nobody was able to find a collision for this hash.

sha1 has pretty good support by common scripting languages like Python or Perl, so you do not have to reinvent the wheel.

As a small data point, a lot of the software is using sha1 as hashing algorithm of choice (git for example).

mvp
  • 111,019
  • 13
  • 122
  • 148
  • Thanks a lot. Maybe I didn't explained my question clearly. Our project need to add database server with minimum cost of data transfer. Are there any other algorithm have this function? – user1803467 Nov 11 '12 at 06:58
  • Choice of hashing algorithm does not really affect amount of data transfer, does it? But, good hash allows you to check if you want to transfer this data in first place, because identical hash would guarantee having identical data payload – mvp Nov 11 '12 at 07:05
  • Thank you very much. Maybe I need to check my requirements again. – user1803467 Nov 11 '12 at 08:44