jay_soo
jay_soo

Reputation: 1328

Does python-memcache use consistent hashing?

I'm using the python-memcache library, and I'm wondering if anyone knows if consistent hashing is used by that client as of 1.44.

Upvotes: 1

Views: 1133

Answers (2)

Koen Bok
Koen Bok

Reputation: 3284

If you need something like that you might be interested in hash_ring

Upvotes: 3

ebo
ebo

Reputation: 9215

From a quick view into the source code: No it does not. It uses server = hash_key % len(servers) and round-robin if offline/full servers are encountered.

Upvotes: 2

Related Questions