Write LRU to database

Jed Reynolds lists at benrey.is-a-geek.net
Wed Nov 15 06:20:14 UTC 2006


Chris Hondl wrote:
> Anyone else have good memcached application outside of caching?

I'm starting to use it to track abusive comment posters on forums that 
take trackbacks and pingbacks. Recently, we had waves of dozens of bots 
posting the same comments simultaneously, to the point of DoS, and it 
was eating up all our apache workers and spiking our database. So we 
coded in some gaurd functionality to count posts-per IP and urls. Using 
the incr() method of memcache turned out to be perfect for this. If some 
ip tries to post more than  a few times an hour, they're blocked. If 
something containing the same url is posted more than a few times an 
hour, that IP gets blocked. I'd never want to thrash mysql with that. 
Memcache turned out to be perfect.

Jed


More information about the memcached mailing list