I want to prevent brute force by checking login attempter’s IP. However it will be a huge problem for the database; it will overload in case of attack. Is there any other solution?
Server side session? Something like
$_SESSION['$IP'] = $_SESSION['$IP'] +1;
I don’t want to use captcha because it is annoying.
In which terms in will overload the DB? You can maintain just one record per IP address with number of failed logins (cleared on successfull login). In the case the number reaches your trashhold you may block the account for an hour for example and maintain one filed with timestamp when the account was blocked. There is no need to log every attempt, right?