#1843 - Failover mode

Identifier #1843
Issue type Feature request or suggestion
Title Failover mode
Status Completed
Handling member Chris Graham
Addon core
Description If there's a failure on the front page, or performance has degraded badly, or the maximum number of online users is hit, failover mode activates automatically. This is managed by a CRON script that runs outside of Composr which can detect the situations (except the last case, which happens within Composr dynamically). It may also deactivate automatically.

On failover mode:
- traffic is automatically delivered out of the guest/bot cache (so no logged in users)
- this happens very early in initialisation, before any database connection is made
- if there's a cache miss, it will say so, rather than trying a live version
- login automatically disabled via a message (any login page hits will be mapped to an error screen)
- a message is injected at the top and bottom of the screen saying there is a fault and no live updates will currently be saved
- a "temporarily unavailable" HTTP status is used, so bots don't cache anything within failover mode

Prerequisites:
- Failover mode is only available if the guest/bot cache is enabled

Failover mode is activated via a setting in info.php. It can have 3 values:
1) 1 (is on)
2) 0 (is off)
3) -1 (is off, but CRON is permitted to put it back to 1)

Failover mode can be bypassed via ?keep_failover=0 in the URL or forced with ?keep_failover=1

Document the behaviour of failsafe mode.
Document that CloudFlare's "Always On" DNS failover system can protect against the cases where you have a more severe hardware/network/DNS issue.
Document good free uptime monitoring tools.
Steps to reproduce

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated