Memcached Infrastructure SOP

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Initial memcached SOP)
 
(redirect page to new infra-docs)
 
(3 intermediate revisions by one user not shown)
Line 1: Line 1:
= memcached - SOP =
+
{{header|infra}}
 +
{{shortcut|ISOP:MEMCACHED}}
  
== Contact Information ==
 
Owner: Fedora Infrastructure Team
 
  
Contact: #fedora-admin, sysadmin-main, sysadmin-web groups
+
This SOP has moved to the fedora Infrastructure SOP git repo. Please see the current document at: http://infrastructure.fedoraproject.org/infra/docs/memcached.txt
  
Location: PHX
+
For changes, questions or comments, please contact anyone in the Fedora Infrastructure team.
  
Servers: app1, app2
 
  
Purpose: Provide caching for Fedora web applications.
+
[[Category:Infrastructure SOPs]]
 
+
== Description ==
+
 
+
Our memcached setup is currently only used for wiki sessions.  With mediawiki, sessions stored in files over NFS or in the DB are very slow.  Memcached is a non-blocking solution for our session storage.
+
 
+
== Checking Status ==
+
 
+
Our memcached instances are currently firewalled to only allow access from wiki application servers.  To check the status of an instance, use:
+
 
+
<pre>
+
echo stats | nc app{1,2} 11211
+
</pre>
+
 
+
from an allowed host.
+
 
+
== Restarting Memcached ==
+
 
+
Note that restarting an memcached instance will drop all sessions stored on that instance.  As mediawiki uses hashing to distribute sessions across multiple instances, restarting one out of two instances will result in about half of the total sessions being dropped.
+
 
+
To restart memcached:
+
 
+
<pre>
+
sudo /etc/init.d/memcached restart
+
</pre>
+
 
+
== Configuring Memcached ==
+
 
+
Memcached is currently setup as a module in the puppet git repo.  The main two tunables are the MAXCONN (the maximum number of concurrent connections) and CACHESIZE (the amount memory to use for storage).  These variables can be set through $memcached_maxconn and $memcached_cachesize in puppet.  Additionally, other options (as described in the memcached manpage) can be set via $memcached_options.
+

Latest revision as of 18:27, 19 December 2011

Infrastructure InfrastructureTeamN1.png
Shortcut:
ISOP:MEMCACHED


This SOP has moved to the fedora Infrastructure SOP git repo. Please see the current document at: http://infrastructure.fedoraproject.org/infra/docs/memcached.txt

For changes, questions or comments, please contact anyone in the Fedora Infrastructure team.