Lots of DB requests when cache expires...

Marcus Bointon marcus at synchromedia.co.uk
Wed Oct 10 08:54:09 UTC 2007

On 10 Oct 2007, at 09:40, Olga Khenkin wrote:

> When some popular object expires from memcached, all its customers  
> try to retrieve the object from database simultaneously, and the  
> database becomes overloaded.
> If this object is requested about 100 times in a minute, and if the  
> process of receiving it from DB, processing and storing in cache  
> takes about a minute, then the database receives 100 identical  
> queries.

The cache evicts stuff on an LRU basis, so anything popular should  
not be kicked out unless relatively speaking it's really not that  
popular, in which case you don't have a problem!

If it's really that popular and it's so expensive to create, then you  
should replace it before it expires.

Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of info at hand CRM solutions
marcus at synchromedia.co.uk | http://www.synchromedia.co.uk/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20071010/87397a0e/attachment.html

More information about the memcached mailing list