This patchset adds a pool of memcache clients. This pool allows for reuse of
a client object, prevents too many client object from being instantiated, and
maintains proper tracking of dead servers so as to limit delays
when a server (or all servers) become unavailable.
The new memcache pool backend is available either by being set as the memcache
backend or by using keystone.token.persistence.backends.memcache_pool.Token for
the Token memcache persistence driver.
Where:
- servers - comma-separated list of host:port pairs (was already there);
- dead_retry - number of seconds memcached server is considered dead
before it is tried again;
- socket_timeout - timeout in seconds for every call to a server;
- pool_maxsize - max total number of open connections in the pool;
- pool_unused_timeout - number of seconds a connection is held unused in
the pool before it is closed;
The new memcache pool backend can be used as the driver for the Keystone
caching layer. To use it as caching driver, set
'keystone.cache.memcache_pool' as the value of the [cache]\backend option,
the other options are the same as above, but with 'memcache_' prefix:
Reviewed: https:/ /review. openstack. org/119452 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=00108032887 48fcd3ce7dba212 a54bffe7a61a0c
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0010803288748fc d3ce7dba212a54b ffe7a61a0c
Author: Yuriy Taraday <email address hidden>
Date: Thu Aug 28 14:27:58 2014 +0400
Add a pool of memcached clients
This patchset adds a pool of memcache clients. This pool allows for reuse of
a client object, prevents too many client object from being instantiated, and
maintains proper tracking of dead servers so as to limit delays
when a server (or all servers) become unavailable.
The new memcache pool backend is available either by being set as the memcache token.persisten ce.backends. memcache_ pool.Token for
backend or by using keystone.
the Token memcache persistence driver.
[memcache] unused_ timeout = 60
servers = 127.0.0.1:11211
dead_retry = 300
socket_timeout = 3
pool_maxsize = 10
pool_
Where:
- servers - comma-separated list of host:port pairs (was already there);
- dead_retry - number of seconds memcached server is considered dead
before it is tried again;
- socket_timeout - timeout in seconds for every call to a server;
- pool_maxsize - max total number of open connections in the pool;
- pool_unused_timeout - number of seconds a connection is held unused in
the pool before it is closed;
The new memcache pool backend can be used as the driver for the Keystone cache.memcache_ pool' as the value of the [cache]\backend option,
caching layer. To use it as caching driver, set
'keystone.
the other options are the same as above, but with 'memcache_' prefix:
[cache] cache.memcache_ pool servers = 127.0.0.1:11211 dead_retry = 300 socket_ timeout = 3 pool_maxsize = 10 pool_unused_ timeout = 60
backend = keystone.
memcache_
memcache_
memcache_
memcache_
memcache_
Co-Authored-By: Morgan Fainberg <email address hidden> 47fcd4fac8948d0 3136fd83f14
Closes-bug: #1332058
Closes-bug: #1360446
Change-Id: I3544894482b30a