How to protect against DDoS attacks?
Xpl0it Yes True, I'll add a point that you have to make algorithm to check against maximum requests allowed per ip, otherwise sometimes high trafic will let algorithm think it is DDoS attack
You could also use a service like Cloudflare and outsource that work so you don't have to handle it if you don't maintenance your own servers.
Try writing an algorithm to check against more requests than acceptable. If it makes too many requests and does so from proxies, create a method for handling those requests.
Good looking out. But I usually blast my requests to run on multiple threads from different ips every 30 seconds. I can see what you're saying but I think it really depends on the severity of the attack. I might add, make sure you also add in a check and balances script to the algorithm to make sure your script isn't accidentally running the requests against itself during this phase or else if you have a root kit in your system, you may end up DDoSing yourself.