memcached driver does not support clustered memecache servers

Bug #1970659 reported by Jorge Merlino
14
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://[HOST[:PORT]][?OPTION1=VALUE1[&OPTION2=VALUE2[&...]]]

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.

Revision history for this message
Christian Rohmann (christian-rohmann) wrote (last edit ):

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/0c145b4567d3b97334ce0a8a2c289403e77b5bbf/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.

Changed in python-tooz:
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.