The earlier rule seems more concise, and both seem to handle browser impersonation. Or do you use both?
I don't use both, but I have.
The residential proxy rule I have posted here, that targets user agent versions which appeared consistently in my logs from residential proxies, ie. the pattern formed from them doing the same thing x times from rotating IP's.
The browser impersonator rule detects incomplete headers.
I use the browser impersonator only at present, because the two rules combined, the residential proxy really just picked up some stragglers and didn't help much. Yes they sort of capture most of a market, combined they do more, but if 200k daily (normal daily use), and the second is doing 30k daily, it translates to stuff all of a problem in my view. Swap them around and get similar results, but I found the browser impersonator did slightly better, so I just use that.
I have never been trying to stop everything nasty, in fact, I don't care that much about it, I just want to stop the worst offenders that cause server problems, and my rules do that. Facebook is actually one of the worst offenders, so if you allow cf.client.bots then you are putting one of the worst offenders for scraping onto your site. This is why I decided to tune what I really needed and block the rest of cf.client.bots, cause its just mostly garbage.
My real traffic, is about right below. If it sits around the 150k - 200k uniques, that is about correct. Vastly above that, there is a problem trying to get in, and from all of the attempts nowadays, my security rules below mimic any attempt to overwhelm (spike uniques matches spike WAF rule blocking it), so those four rules are doing their job, and the most important one is last, the load bearing one. Anything that gets past the browser impersonator and tries to bring the server down with search, is caught and stopped.
And the most important part, is that cache figure. 65% of requests are being served from CF cache and never touching the origin. I can go balls to the wall, add residential proxy rule and I would say... combined that takes 95% of the garbage from my server, which would improve further my caching output,
but the server is highly tuned. That is where I spent my time, not chasing bots around. My caching is realistically higher than that figure, because what is hitting the server also gets cached data from Redis.
Block the worst offenders, tune your server to the enth degree, that should be every admins focus. I can have millions of uniques and not crash my server, providing they aren't all hitting search at once. I've had a million daily uniques with search open, and it survived just fine. About 1.5M daily uniques onwards, with search open, starts causing issues and nothing will solve it other than more cpu cores, so I protect search and honestly, the rest can have at it, because everything after the first pull, all further bots, will get primarily cached data, which is what you want. First one is load, everything after trying to kill your server, has little impact getting cached data. Search and DB are both fully in RAM too.
Chasing bots is not the solution. I analysed the logs, found the logs themselves weren't capturing the actual data I truly needed to get a true fingerprint of the issue, so I had to change what the logs captured first, that increased the log file size significantly, so I implemented compression, download and rotation policy on logs to my system, that data allowed me to fingerprint the true issue with the right header info, and hence the rules I have shared here.
BUT... that is what hits my site, you may get slightly different different data from your logs, requiring a slightly different rule.
