I didn't get a chance to update to the released version of 1.1.2 but at around 14 hours and consistent 8000 guests I started getting gateway timeouts and high database load. Site restored after disabling addon for now. Claude reports:
Finding: The updated version performs well under normal load but degrades over extended periods of high bot traffic. After ~14 hours under DDoS conditions (~8,000 concurrent guests), cumulative DB write volume caused InnoDB history list to climb and query times to increase, resulting in gateway timeouts. The per-request writes to xf_zee_botguard_session, xf_zee_botguard_counter, and xf_zee_botguard_event tables, combined with embedded botguard state in every xf_session write, generate sustained write pressure that the RDS purge thread cannot keep pace with under attack conditions. No lock cascades observed (improvement over previous version), but the fundamental issue of DB writes on every request makes the addon unsuitable for sites experiencing sustained high-volume bot traffic. A write buffer, async logging, or Redis-based rate limiting would help significantly.
Thanks - that makes sense, and I appreciate the detailed follow-up.
The important thing I take from this is that the latest version did materially improve things. Previously, under this kind of bot pressure, you had to disable the add-on much sooner. This time it lasted around 14 hours under roughly 8,000 guests, and the earlier lock-cascade style failure does not appear to be the main issue anymore.
That said, this also shows the limit of where XF Bot Guard sits in the stack.
XF Bot Guard is an application-layer XenForo add-on. It makes decisions once the request has already reached XenForo/PHP. It is not a firewall, reverse proxy, CDN, WAF, nginx rule, Apache rule, LiteSpeed rule, or iptables block, and it cannot stop requests before they reach the origin.
So under sustained DDoS-style traffic, especially with thousands of guests continuously reaching PHP and MySQL for many hours, the correct first layer of defence still needs to be upstream: Cloudflare, WAF rules, rate limits, server firewall rules, origin lockdown, or host-level mitigation. Bot Guard can then work as the XenForo-aware layer behind that, where it can see routes, sessions, CAPTCHA state, cookies, collector state, and reputation signals.
I do still plan to improve high-traffic behaviour further. The likely direction is to use XenForo’s configured cache layer, where available, for more front-line real-time behaviour, followed by buffered or rolled-up database writes. That would reduce pressure on MySQL while preserving immediate request-time decisions. However, XenForo does not require a cache to be configured by default, so the add-on also has to keep working safely on standard installations where the database is the only reliable shared store.
There are trade-offs there. Buffered writes can reduce database pressure, but if the server crashes before the buffer is flushed, some diagnostic/event data may be lost. That is not catastrophic for bot protection, but it is still a real operational trade-off.
So my view is:
The latest version improved the situation significantly, but if 8,000 hostile guests are being allowed to continuously reach PHP/MySQL for many hours, Bot Guard should not be expected to solve that alone. It is not intended to be a one-and-only front-line defence under DDoS conditions. In those conditions, it should be used behind proper edge/server protection, not instead of it.
I do expect Bot Guard’s high-traffic resilience to improve over time, including better use of configured cache layers and safer buffering strategies. But at its current stage, I cannot honestly position it as a standalone DDoS mitigation product. It is a XenForo-aware bot challenge and behaviour layer, and for DDoS-style conditions it needs to sit behind proper upstream protection.
To be clear, I do not read this as Bot Guard failing to identify the problem traffic. From what you have described, it was doing its job and denying/challenging the bots. The remaining issue is the cost of doing that work after the traffic has already reached XenForo/PHP/MySQL.
That is the part I want to improve further over time. There is clearly room to make the high-traffic path cheaper, especially by using configured cache layers more aggressively where available and by reducing or buffering non-critical database writes.
But that is still different from true DDoS mitigation. If thousands of hostile guests are continuously reaching the origin for many hours, the first layer of defence still needs to be upstream. Bot Guard can then sit behind that as the XenForo-aware layer that understands sessions, CAPTCHA state, cookies, routes, and forum-specific behaviour.