rate limiting in varnish

Hettwer, Marian mhettwer at team.mobile.de
Thu Jul 14 14:52:18 CEST 2011


Hi All,

Before we are going to try to write our own VMOD, does anybody
accomplished to do rate limiting with varnish?
As in:

We like to rate limit some scrapers. They don't generate cache hits and
will always punch right through to the backend. This is not good(tm).
The thought here is to do rate limiting on client.ip base.
If client.ip hits us more than n times / second, go to vcl_error and
either throw him an error or probably even drop the connection.
If bots are nasty to us, sometimes it's good to be nasty to them, eh? ;)

Any thoughts/pointers on how one would implement this in varnish?


Thanks in advance,
Marian





More information about the varnish-misc mailing list