<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Nginx and Memcached, a 400% boost!</title>
	<atom:link href="http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/</link>
	<description>A goal is a dream with a deadline.</description>
	<pubDate>Sun, 05 Jul 2009 02:51:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Miguel Pilar</title>
		<link>http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/comment-page-2/#comment-180896</link>
		<dc:creator>Miguel Pilar</dc:creator>
		<pubDate>Sun, 29 Mar 2009 21:49:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/#comment-180896</guid>
		<description>Why exactly not use &lt;a href="http://varnish.projects.linpro.no/" rel="nofollow"&gt;Varnish&lt;/a&gt; for this since it's exactly what it's designed to do and scales very well. 

At work we use (HAProxy)-&gt;(Varnish-&gt;HAProxy)-&gt;(IIS). Each parenthesis is a computer/cluster, basically we have a 4 node HAP cluster talking to a 4 node Varnish-HAP cluster, in which each computer has varnish talking to a local HAP (it can also talk to the cluster's other HAP but their weight is negligible, only used if local machine's HAP is dead). We mostly use HAProxy because it has much better load balancing and queueing options than Varnish. 

Total time for a request is under 9ms on a primed cache usually and we serve 30,000 -&gt; 150,000 hits per second. Our peak CPU usage on the machines has been 5% at 150k hits/s.</description>
		<content:encoded><![CDATA[<p>Why exactly not use <a href="http://varnish.projects.linpro.no/" rel="nofollow">Varnish</a> for this since it&#8217;s exactly what it&#8217;s designed to do and scales very well. </p>
<p>At work we use (HAProxy)-&gt;(Varnish-&gt;HAProxy)-&gt;(IIS). Each parenthesis is a computer/cluster, basically we have a 4 node HAP cluster talking to a 4 node Varnish-HAP cluster, in which each computer has varnish talking to a local HAP (it can also talk to the cluster&#8217;s other HAP but their weight is negligible, only used if local machine&#8217;s HAP is dead). We mostly use HAProxy because it has much better load balancing and queueing options than Varnish. </p>
<p>Total time for a request is under 9ms on a primed cache usually and we serve 30,000 -&gt; 150,000 hits per second. Our peak CPU usage on the machines has been 5% at 150k hits/s.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Coates</title>
		<link>http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/comment-page-2/#comment-178414</link>
		<dc:creator>Mark Coates</dc:creator>
		<pubDate>Thu, 19 Mar 2009 18:50:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/#comment-178414</guid>
		<description>Very interesting results, @Ilya. I've been looking for any way to squeeze the last little nanoseconds out of some intensive processing and I think this might be a way to help.  Thank you for posting your results!</description>
		<content:encoded><![CDATA[<p>Very interesting results, @Ilya. I&#8217;ve been looking for any way to squeeze the last little nanoseconds out of some intensive processing and I think this might be a way to help.  Thank you for posting your results!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/comment-page-2/#comment-177795</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Sun, 15 Mar 2009 22:56:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/#comment-177795</guid>
		<description>@meppum: Great questions. This architecture does work with multiple memcached servers, albeit it is a little more involved, and there is one small caveat. If you want to use multiple instances of memcached to load-balance your requests, then your application servers just have to set the correct key/values in all of the memcached servers. From there, you can configure nginx to rotate between multiple memcached instances. (aka all memcached servers store all the data)

One limitation that this scheme does have is the inability to split the cached data between multiple instances (with consistent hashing), largely because the current nginx memcached module does not have the consistent hashing logic. This could be addressed by extending the nginx module though!</description>
		<content:encoded><![CDATA[<p>@meppum: Great questions. This architecture does work with multiple memcached servers, albeit it is a little more involved, and there is one small caveat. If you want to use multiple instances of memcached to load-balance your requests, then your application servers just have to set the correct key/values in all of the memcached servers. From there, you can configure nginx to rotate between multiple memcached instances. (aka all memcached servers store all the data)</p>
<p>One limitation that this scheme does have is the inability to split the cached data between multiple instances (with consistent hashing), largely because the current nginx memcached module does not have the consistent hashing logic. This could be addressed by extending the nginx module though!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: meppum</title>
		<link>http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/comment-page-2/#comment-177754</link>
		<dc:creator>meppum</dc:creator>
		<pubDate>Sun, 15 Mar 2009 20:39:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/#comment-177754</guid>
		<description>Is that to say that there must be only one instance of memcached for all instances of nginx with any extra memcached instances used as fail over servers?

That would be discouraging as the advantage of memcached is that you can farm out the requests.

If both nginx and the client library (in this case ruby's) used the same caching algorithm would caching against a  farm work? If so, what would the nginx.conf look like? What is the algorithm that nginx uses to cache to memcached?

Good article. Thanks.</description>
		<content:encoded><![CDATA[<p>Is that to say that there must be only one instance of memcached for all instances of nginx with any extra memcached instances used as fail over servers?</p>
<p>That would be discouraging as the advantage of memcached is that you can farm out the requests.</p>
<p>If both nginx and the client library (in this case ruby&#8217;s) used the same caching algorithm would caching against a  farm work? If so, what would the nginx.conf look like? What is the algorithm that nginx uses to cache to memcached?</p>
<p>Good article. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/comment-page-2/#comment-172792</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Thu, 26 Feb 2009 18:46:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/#comment-172792</guid>
		<description>Mike, memcached_pass can take multiple servers, albeit you're right, it won't hash between them (it'll use them as mirrors). Take a look at *next_upstream function to see an example of this in action: http://wiki.codemongers.com/NginxHttpMemcachedModule</description>
		<content:encoded><![CDATA[<p>Mike, memcached_pass can take multiple servers, albeit you&#8217;re right, it won&#8217;t hash between them (it&#8217;ll use them as mirrors). Take a look at *next_upstream function to see an example of this in action: <a href="http://wiki.codemongers.com/NginxHttpMemcachedModule" rel="nofollow">http://wiki.codemongers.com/NginxHttpMemcachedModule</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Perham</title>
		<link>http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/comment-page-2/#comment-172763</link>
		<dc:creator>Mike Perham</dc:creator>
		<pubDate>Thu, 26 Feb 2009 16:26:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/#comment-172763</guid>
		<description>FYI This doesn't scale to multiple memcached servers cleanly although I don't see a way around that because nginx's memcached module and Ruby's memcache-client use different algorithms to map from key to server.  You'd need to do some HAProxy trickery to allow this to work with a farm of memcached boxes.</description>
		<content:encoded><![CDATA[<p>FYI This doesn&#8217;t scale to multiple memcached servers cleanly although I don&#8217;t see a way around that because nginx&#8217;s memcached module and Ruby&#8217;s memcache-client use different algorithms to map from key to server.  You&#8217;d need to do some HAProxy trickery to allow this to work with a farm of memcached boxes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daily Digest for 2009-02-11 &#124; Pedro Trindade</title>
		<link>http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/comment-page-2/#comment-168523</link>
		<dc:creator>Daily Digest for 2009-02-11 &#124; Pedro Trindade</dc:creator>
		<pubDate>Thu, 12 Feb 2009 08:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/#comment-168523</guid>
		<description>[...] Nginx and Memcached, a 400% boost! - igvita.com [...]</description>
		<content:encoded><![CDATA[<p>[...] Nginx and Memcached, a 400% boost! - igvita.com [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ANIONU :: Nginx and Memcached, a 400% boost! :: Creative Media &#38; Web Development</title>
		<link>http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/comment-page-2/#comment-153492</link>
		<dc:creator>ANIONU :: Nginx and Memcached, a 400% boost! :: Creative Media &#38; Web Development</dc:creator>
		<pubDate>Sat, 20 Dec 2008 09:27:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/#comment-153492</guid>
		<description>[...] Read more&#8230; [...]</description>
		<content:encoded><![CDATA[<p>[...] Read more&#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scaling php with nginx, spawn-fcgi, ssi, xcache, and memcached: Part 1 - install everything &#124; breaker of stuff, destroyer of things</title>
		<link>http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/comment-page-2/#comment-150855</link>
		<dc:creator>Scaling php with nginx, spawn-fcgi, ssi, xcache, and memcached: Part 1 - install everything &#124; breaker of stuff, destroyer of things</dc:creator>
		<pubDate>Thu, 04 Dec 2008 17:45:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/#comment-150855</guid>
		<description>[...] memcached cache idea: www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/   Share and [...]</description>
		<content:encoded><![CDATA[<p>[...] memcached cache idea: <a href="http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/" rel="nofollow">http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/</a>   Share and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gudasoft &#187; Blog Archive &#187; Nginx with Rails</title>
		<link>http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/comment-page-2/#comment-144935</link>
		<dc:creator>Gudasoft &#187; Blog Archive &#187; Nginx with Rails</dc:creator>
		<pubDate>Mon, 10 Nov 2008 06:52:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/#comment-144935</guid>
		<description>[...] gem nginx_config_generator example scripts: http://topfunky.net/svn/shovel/nginx/ nginx connects directly to memcached for caching for restarting nice you might want to see seesaw gem (presentation here) or [...]</description>
		<content:encoded><![CDATA[<p>[...] gem nginx_config_generator example scripts: <a href="http://topfunky.net/svn/shovel/nginx/" rel="nofollow">http://topfunky.net/svn/shovel/nginx/</a> nginx connects directly to memcached for caching for restarting nice you might want to see seesaw gem (presentation here) or [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
