I've got the same question like this one which was answered 9 years ago, and the answers given are quite useless (How to delay login attempts after too many tries (PHP))
How can you delay login attempts against bots without using sleep()? It seems obviously confusing to want to prevent DoS attacks from the client-side code...I do not understand, where I can set the 'delays', or the 'http request to login' to come from the actual server/apache or something.
Please be lenient, I left it for days because of burnout and came back to it now, still finding no understanding on it.
I understand and implement the throttling part - I know how to set up the DB and tables to capture each failed attempt, but not how to set apache/the server/whatever needs to be set up to 'pause' the script (the script which processes the login form) for that current user/IP address to login for the next x seconds?
Is it done using PHP? Or do you set up your apache config, or an htaccess rule, to do it? I really need help with this...