memcached driver does not support clustered memecache servers
Bug #1970659 reported by
Jorge Merlino
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tooz |
New
|
Wishlist
|
Unassigned |
Bug Description
The Memcached driver connection URI is like:
memcached:
and does not support specifying several memcached servers in a HA cluster. It would be useful to be able to specify several memcached servers in the configuration.
Changed in python-tooz: | |
importance: | Undecided → Wishlist |
To post a comment you must log in.
I was wondering about this as well. Memcached is actually not a cluster (with nodes talking to each other) but just a client with multiple individual servers to write to and read from.
Without multiple memcached hosts configured there will be data loss (e.g. active locks, groups, ...) if that memcached instance is restarted - this totally defies the purpose of having a distributed locking.
From looking at the code at https:/ /github. com/openstack/ tooz/blob/ 0c145b4567d3b97 334ce0a8a2c2894 03e77b5bbf/ tooz/drivers/ memcached. py#L289
you can see that only a regular PooledClient is used. To access a memcached cluster pymemcache documents to use HashClient: https:/ /pymemcache. readthedocs. io/en/latest/ getting_ started. html#using- a-memcached- cluster
But even then data is not stored "redundantly" on multiple nodes, but rather the keyspace is hashed across the nodes.
This this does not fit the use case.
All in all memcached, even though available on most OpenStack installations seems wrong to use for Tooz.