views:

59

answers:

2

What should i do to prevent users from running scanners or auto posting robots against my site that would slow down the site processing?

Is it sufficient to timestamp each post a user makes and create a posting delay? How long of an interval should there be?

What else can I do besides te above and captchas on form posts?

thanks

+1  A: 

A time interval is a good idea and is used on Stack Overflow. Different operations should have different time limits depending on:

  1. How often ordinary users are likely to want to use that feature.
  2. How intensive the operation is.

If you have an operation that requires a lot of processing time, you might want to set the limit on that operation higher than for a relatively simple operation.

Stack Overflow combines time limits with CAPTCHAs for editing posts. If you edit too frequently you have to pass a CAPTCHA test.

Mark Byers
ok what about a simple js ajax post (one variable)? If I had a several of these and is it worth putting in an interval or is there not much to slow down there?
zsharp
For very simple operations, i.e. when the processing time for checking the rate limits exceeds or is comparable to the time taken for actually performing the operation then there isn't much point in adding the check - just perform the operation.
Mark Byers
what about a search box that queries sql server? should there be a delay for that? assuming bots attack..
zsharp
@zsharp: If bots attack you are probably in trouble anyway. Banning their IP address at the router level before it hits your server is probably the best you can do. But certainly if your search query is quite resource intensive then putting a slight delay between requests can buy you some extra time. You can also slowly increase the time required between requests if the user still doesn't slow down.
Mark Byers
+1  A: 

I googled this a year ago or so and found a list of known "bad useragents", which I added to my .htaccess to block those from accessing my blog. this small change had a significant impact on my bandwidth usage.

futtta