<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: memcache</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/memcache.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2009-02-23T08:28:00+00:00</updated><author><name>Simon Willison</name></author><entry><title>Building and Scaling a Startup on Rails: 12 Things We Learned the Hard Way</title><link href="https://simonwillison.net/2009/Feb/23/building/#atom-tag" rel="alternate"/><published>2009-02-23T08:28:00+00:00</published><updated>2009-02-23T08:28:00+00:00</updated><id>https://simonwillison.net/2009/Feb/23/building/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://axonflux.com/building-and-scaling-a-startup"&gt;Building and Scaling a Startup on Rails: 12 Things We Learned the Hard Way&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Lessons learned from Posterous. Some good advice in here, in particular “Memcache later:  If you memcache first, you will never feel the pain and never learn how bad your database indexes and Rails queries are”. Also recommends using job queues for offline processing of anything that takes more than 200ms.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/memcache"&gt;memcache&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/message-queues"&gt;message-queues&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/posterous"&gt;posterous&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rails"&gt;rails&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/scaling"&gt;scaling&lt;/a&gt;&lt;/p&gt;



</summary><category term="memcache"/><category term="message-queues"/><category term="posterous"/><category term="rails"/><category term="scaling"/></entry><entry><title>Sharding Counters on Google App Engine</title><link href="https://simonwillison.net/2009/Jan/27/sharding/#atom-tag" rel="alternate"/><published>2009-01-27T20:27:41+00:00</published><updated>2009-01-27T20:27:41+00:00</updated><id>https://simonwillison.net/2009/Jan/27/sharding/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://code.google.com/appengine/articles/sharding_counters.html"&gt;Sharding Counters on Google App Engine&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
“While the datastore for App Engine scales to support a huge number of entities it is important to note that you can only expect to update any single entity, or entity-group, about five times a second”. This article explains a technique for sharding writes across multiple counters in detail, including a way to keep a memcache counter updated at the same time for faster reads.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/caching"&gt;caching&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google"&gt;google&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google-app-engine"&gt;google-app-engine&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/memcache"&gt;memcache&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/scaling"&gt;scaling&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sharding"&gt;sharding&lt;/a&gt;&lt;/p&gt;



</summary><category term="caching"/><category term="google"/><category term="google-app-engine"/><category term="memcache"/><category term="python"/><category term="scaling"/><category term="sharding"/></entry><entry><title>MemcacheDB</title><link href="https://simonwillison.net/2009/Jan/5/memcachedb/#atom-tag" rel="alternate"/><published>2009-01-05T12:37:15+00:00</published><updated>2009-01-05T12:37:15+00:00</updated><id>https://simonwillison.net/2009/Jan/5/memcachedb/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://memcachedb.org/"&gt;MemcacheDB&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A server that speaks the memcache protocol but uses Berkeley DB for reliable persistent storage. Speedy: 20,000 writes/second and 60,000+ reads/second. Includes a full replication mechanism (with custom memcache protocol commands) based on Berkeley DB’s.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/berkeleydb"&gt;berkeleydb&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/keyvaluepairs"&gt;keyvaluepairs&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/memcache"&gt;memcache&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/memcachedb"&gt;memcachedb&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/replication"&gt;replication&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/scaling"&gt;scaling&lt;/a&gt;&lt;/p&gt;



</summary><category term="berkeleydb"/><category term="keyvaluepairs"/><category term="memcache"/><category term="memcachedb"/><category term="replication"/><category term="scaling"/></entry><entry><title>Using Memcache with Google App Engine</title><link href="https://simonwillison.net/2008/May/28/memcache/#atom-tag" rel="alternate"/><published>2008-05-28T23:11:06+00:00</published><updated>2008-05-28T23:11:06+00:00</updated><id>https://simonwillison.net/2008/May/28/memcache/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://code.google.com/appengine/docs/memcache/usingmemcache.html"&gt;Using Memcache with Google App Engine&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Brad Fitzpatrick’s 20% time project.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/brad-fitzpatrick"&gt;brad-fitzpatrick&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google"&gt;google&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google-app-engine"&gt;google-app-engine&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/memcache"&gt;memcache&lt;/a&gt;&lt;/p&gt;



</summary><category term="brad-fitzpatrick"/><category term="google"/><category term="google-app-engine"/><category term="memcache"/></entry><entry><title>NginxMemcachedModule</title><link href="https://simonwillison.net/2007/Dec/15/nginxmemcachedmodule/#atom-tag" rel="alternate"/><published>2007-12-15T01:59:23+00:00</published><updated>2007-12-15T01:59:23+00:00</updated><id>https://simonwillison.net/2007/Dec/15/nginxmemcachedmodule/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://wiki.codemongers.com/NginxMemcachedModule"&gt;NginxMemcachedModule&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
nginx can be set up to directly serve a URL from memcache if the corresponding cache key is set, and fall back to a backend application server otherwise. Application servers can then write directly to memcache when content needs to be cached or goes stale.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/caching"&gt;caching&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/memcache"&gt;memcache&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/memcached"&gt;memcached&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/nginx"&gt;nginx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/scaling"&gt;scaling&lt;/a&gt;&lt;/p&gt;



</summary><category term="caching"/><category term="memcache"/><category term="memcached"/><category term="nginx"/><category term="scaling"/></entry><entry><title>Clever Caching</title><link href="https://simonwillison.net/2007/Jul/5/caching/#atom-tag" rel="alternate"/><published>2007-07-05T00:56:33+00:00</published><updated>2007-07-05T00:56:33+00:00</updated><id>https://simonwillison.net/2007/Jul/5/caching/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.koziarski.net/archives/2007/5/28/clever-caching"&gt;Clever Caching&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Instead of invalidating your cache directly, bump a version number on your model (blog entry or whatever) and use that as part of the cache key. This also gives you dynamic etags for free.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/caching"&gt;caching&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/etags"&gt;etags&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/memcache"&gt;memcache&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/michael-koziarski"&gt;michael-koziarski&lt;/a&gt;&lt;/p&gt;



</summary><category term="caching"/><category term="etags"/><category term="memcache"/><category term="michael-koziarski"/></entry><entry><title>libketama</title><link href="https://simonwillison.net/2007/Apr/20/libketama/#atom-tag" rel="alternate"/><published>2007-04-20T06:50:51+00:00</published><updated>2007-04-20T06:50:51+00:00</updated><id>https://simonwillison.net/2007/Apr/20/libketama/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.last.fm/user/RJ/journal/2007/04/10/392555/"&gt;libketama&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A consistent hashing algorithm for memcache clients, from the team at last.fm.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://del.icio.us/deusx"&gt;Les Orchard&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/hashing"&gt;hashing&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/lastfm"&gt;lastfm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/les-orchard"&gt;les-orchard&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/memcache"&gt;memcache&lt;/a&gt;&lt;/p&gt;



</summary><category term="hashing"/><category term="lastfm"/><category term="les-orchard"/><category term="memcache"/></entry></feed>