Hello everyone. I thought about the problem with the load on the server. I think we need to make a limit on the frequency of requests, in particular with ajax.
Restrict the user to 15 seconds if the hit rate is less than 5 seconds.
Can’t imagine what variant methods could be. I thought that it was possible to take the last record from the database and look at the time of adding, but this is not a functional method, and besides, it is not profitable, since a query to the database must be made anyway.
What options for solving such a problem are there? Thank you.
Answer 1, authority 100%
You can either do this using nginx/Apache/iptables or not do it at all.
Because you have a goal to reduce the load on the server from too “active” users. It can be said from DDOS. Just one of the protections against DDOS is a ban on many requests from 1 IP.
A request counter reset via