

The 'Dogpile Effect' and how to avoid it with RoR memcache-client patch - tomh
http://blog.kovyrin.net/2008/03/10/dog-pile-effect-and-how-to-avoid-it-with-ruby-on-rails-memcache-client-patch/

======
andr
What I'm doing in my homegrown framework to avoid/reduce memcache dogpiling is
this (pseudocode):

    
    
      n = 1000;
      key = "myMemCacheEntry";
    
      if (random(0,n) == 1 || (value = memcache_get(key)) == false) {
          value = compute_value();
          memcache_put(key,value);
      } 
    
      return value;
    

Adjust _n_ according to your current peak traffic. When traffic is low, the
algorithm won't always catch on, but the dogpiling won't be as severe.

