Configure memcached
The following instructions tell you to make changes in your
common configuration layer, because they are based on the assumption
that you want all your Content Engines to
share a common cache. If this is not the case, then the following
actions should be carried out in the host configuration layers of
the hosts you want to use memcached
.
To configure memcached
you need to add a
.properties
file to your common configuration
layer.
-
Log in as
escenic
on one of your engine hosts. -
Create a folder for the new properties file:
$
mkdir -p /etc/escenic/engine/common/com/danga/ -
Create a file called
SockIOPool.properties
in the new folder, open it for editing and add the following content:$class=com.danga.MemCached.SockIOPool # fill in memcached servers here. servers=host-name1:11211,host-name2:11211 # how many connections to use initConn = 10 minConn = 5 maxConn = 100 # idle time maxIdle = 180000 maintSleep = 5000 # socket timeout socketTO = 3000 failover = true # a network lookup algorithm nagle = false
where host-name1, host-name2, etc. are replaced by the names of the hosts on which you have installed
memcached
.The above parameter settings should work satisfactorily in most cases. Should you need to modify them, consult the documentation available on the memcached web site (http://memcached.org/).
-
Open
/etc/escenic/engine/common/Initial.properties
for editing and add the following lines:# using memcached service.0.0-memcached-socket-pool=/com/danga/SockIOPool