Earlier quoted context omitted.
> If there exists a solution to either not using cloudflare, > or some option hidden away that allows me to tell clouflare > o fuck off with how it treats traffic, I'd love to know. The method I use to avoid CloudFlare altogether (probably wrong as it's bespoke) is to do the following before "handling" the request: * Store all connecting IPs, last request time and the rate at which requests are being made in a servic…
Do you even need to store ips? Just count accepted connections and every, say, 1000th connection check current time, if less than a second elapsed since previous check, close the listening socket. Isn't ddos caused by packet congestion rather than server processing?
> connection check current time, if less than a second
> elapsed since previous check, close the listening socket.
Then you risk killing genuine traffic. Above average hit from a handful of locations is more likely to be abuse.
> Isn't ddos caused by packet congestion rather than server
> processing?
From what I understand, a DDoS attack any pat of your system, usually the part that is the slowest. You want to kill attacking traffic as quickly as possible without affecting genuine traffic. As for attacks on the network itself, this is where you rely on your cloud service provider.