Reputation: 15243
I'm creating a website that has both commenting and voting systems. I wanted to prevent users (or bots) from clicking too much, by storing the last activity timestamp and if the last activity is less than 5 seconds, I show an error message to them. Currently I have implemented this in the MySQL DB but I'm thinking, I can move this to the session instead to improve performance. Which approach you think is better and why? Also, what other suggestions you have to prevent bots from spamming/putting load on my system?
EDIT: Now that I think a little more about it, the session approach is not secure enough. Cookie is not either. A bot can remove the cookie and hit the server again.
Upvotes: 0
Views: 123
Reputation: 157828
Moving the thing to the session will surely reduce the load of the bot server, making their job a lot easier.
what suggestions you have to prevent bots from spamming/putting load on my system?
this is another question I believe.
Upvotes: 1