Our customers install the CrowdHandler plugin to withstand heavy traffic. Unsurprisingly, the same customers often install caching plugins to speed up their websites. Unfortunately there can be a conflict between the two, and caching plugins and cloud services can interfere with CrowdHandler’s ability to offload and return users to your site fairly.
Unless you understand the dynamics of your caching system very well, we recommend disabling caching plugins and cloud caching services when using CrowdHandler. Users have reported issues using our WordPress plugin with:
CloudFlare (when set to cache pages, not just assets)
There are a plethora of caching plugins and services available for WordPress and others, not listed here, could cause issues. Whilst CrowdHandler acts as a ‘good citizen’ and sets the correct standards-based cache headers to assist third party services, these are not always respected as some plugins seek to maximise caching behavior by overriding standards.
Cloud-based services may be particularly susceptible to this issue, because the caching behavior is implemented outside WordPress, and can not be overridden by our plugin.
What’s the problem?
Our Wordpress Plugin checks the user’s cookie with the CrowdHandler API and redirects the user to the waiting room if they need to wait. Caching plugins can cache the cookie and/or the redirect. This means that users can come back to the site from the waiting room but be sent back, because the caching plugin has cached another user’s redirect. This will be experienced as users being sent to the waiting room multiple times, and with a seeming randomness relating to whether the user gets through or not.
Can I confirm if my site has this issue?
If you think your site is experiencing this problem, or want to test for this possibility, there is a simple test you can run in a terminal window.
curl -I https://yourdomain.com/some-protected-url
You should see the headers come back from your page, including the crowdhandler cookie.
Repeat the request quickly. If the same cookie comes back (identical value), it is being cached.
What should I do?
- Disable caching plugins and services and repeat the test. If you start to see a new cookie each time, the issue is resolved. (it may take some time for caches to expire before you see the fix)
- If CrowdHandler is protecting only un-cached URLs then it will not be susceptible to this issue, so you could try reducing the URL coverage of your waiting room to URLs that are not cached.
- If the caching layer causing the problem is Cloudflare, you should probably be using our Cloudflare edge worker instead of the Wordpress Plugin. Set up the edge worker, and disable the Wordpress plugin.