<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.14.1">
</HEAD>
<BODY>
On Fri, 2007-10-19 at 12:19 -0700, Jason Gross wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">I am evaluating memcached for our web farm and wanted to poll this </FONT>
<FONT COLOR="#000000">list for some experience in designing, deploying and maintaining it. </FONT>
<FONT COLOR="#000000">Specifically I want to analyze the overhead from a development / </FONT>
<FONT COLOR="#000000">resource and maintenance standpoint so that I can properly plan this </FONT>
<FONT COLOR="#000000">effort. Would anyone on this list be willing to share their </FONT>
<FONT COLOR="#000000">experience with deploying memcached?</FONT>
<FONT COLOR="#000000">The site I am working on is a social networking site that users can </FONT>
<FONT COLOR="#000000">upload individual products which other users can comment on, purchase </FONT>
<FONT COLOR="#000000">etc. The site is growing quite rapidly and is beginning to show </FONT>
<FONT COLOR="#000000">significant slowdowns during peak periods. I have a decent </FONT>
<FONT COLOR="#000000">understanding of what memcached provides and feel that its compelling </FONT>
<FONT COLOR="#000000">enough to give it a try as there are a significant amount of database </FONT>
<FONT COLOR="#000000">queries on each page load. I'd be interested in any feedback but have </FONT>
<FONT COLOR="#000000">some specific questions below of what I am looking for.</FONT>
<FONT COLOR="#000000">1. Are there tools that exist to help analyze which queries should be </FONT>
<FONT COLOR="#000000">cached?</FONT>
</PRE>
</BLOCKQUOTE>
Slow ones. If you're in MySQL, you can set up the MySQL slow query log to help you here.
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">2. What exists to monitoring and analyze for cache performance on a </FONT>
<FONT COLOR="#000000">daily basis?</FONT>
</PRE>
</BLOCKQUOTE>
We have a page which simply displays extended stats for our farm. Most of the info we need can be found there.
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">3. What level of effort was required to integrate memcached into the </FONT>
<FONT COLOR="#000000">application?</FONT>
</PRE>
</BLOCKQUOTE>
<BR>
Minimal - we use ADODB in PHP, which includes query caching via memcache out of the box, and we have our own caching framework that uses memcache as its backend. If you're caching anyway, it should be reasonably simple to use memcache as a backend instead or in addition to your current setup.
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">4. What was the support overhead from a time and expertise standpoint </FONT>
<FONT COLOR="#000000">to maintain this?</FONT>
</PRE>
</BLOCKQUOTE>
After setup, <FONT COLOR="#000000">support has been minimal - we've only had downtime when we've been upgrading the software. It's pretty stable.</FONT>
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">5. Are there any issues or problems in integrating and deploying the </FONT>
<FONT COLOR="#000000">cache that are non-obvious or particularly time consuming?</FONT>
</PRE>
</BLOCKQUOTE>
In our case, not really. It really depends on your current caching codebase. The only problem is the (current) lack of a consistent hashing algorithm [1] but YMMV.
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">7. Are there any hardware requirements for the cache servers or </FONT>
<FONT COLOR="#000000">specific hardware that perform much better in a highly loaded </FONT>
<FONT COLOR="#000000">environment? (Perhaps specific NICs that do better then others)</FONT>
</PRE>
</BLOCKQUOTE>
There are people on this list with far bigger farms than us - check their replies instead :D
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Thanks!</FONT>
<FONT COLOR="#000000">-Jason</FONT>
</PRE>
</BLOCKQUOTE>
<BR>
Hope that helps, or at least reassures you that implementation should be straightforward!<BR>
<BR>
Cheers,<BR>
Rob.<BR>
<BR>
[1] <A HREF="http://www.socialtext.net/memcached/index.cgi?faq#how_does_memcached_handle_failover">http://www.socialtext.net/memcached/index.cgi?faq#how_does_memcached_handle_failover</A><BR>
<BR>
Pay attention to "With default clients <B>adding or removing</B> servers will invalidate all of your cache!"<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<TABLE CELLSPACING="3" CELLPADDING="0" WIDTH="100%">
<TR>
<TD COLSPAN="2" VALIGN="top">
<B><FONT SIZE="2"><FONT COLOR="#333333">Rob Sharp</FONT></FONT></B><BR>
<FONT SIZE="1"><FONT COLOR="#ce4a84">Development Lead </FONT></FONT><BR>
<BR>
<B><FONT SIZE="1">telephone:</FONT></B><FONT SIZE="1"> 02 9282 4038</FONT><BR>
<B><FONT SIZE="1">facsimile:</FONT></B><FONT SIZE="1"> 02 9282 4099</FONT><BR>
<B><FONT SIZE="1">skype:</FONT></B><FONT SIZE="1"> qu4nnum</FONT><BR>
<BR>
<BR>
<BR>
</TD>
</TR>
<TR>
<TD COLSPAN="2" VALIGN="top">
<FONT SIZE="2"><FONT COLOR="#333333">Sound Alliance </FONT></FONT><BR>
<FONT SIZE="1"><FONT COLOR="#ce4a84">inthemix : FasterLouder : Thought By Them : SameSame</FONT></FONT>
</TD>
</TR>
</TABLE>
<BR>
<FONT SIZE="2"><FONT COLOR="#339966">100% recycled electrons were used for the composition of this email </FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#339966">- please don't print it unless you need to!</FONT></FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>