Summary
In the event that the proxy is unreachable, or that hCaptcha is unreachable from the proxy, we need a graceful way to automatically fallback to FancyCAPTCHA. In this task, we should discuss options.
Technical notes
Option 1: Per request roundtrip ping
- in ConfirmEdit Hooks::getInstance(), do a request (with a low timeout limit) to the proxy, or to a specific endpoint behind the proxy (e.g. https://docs.hcaptcha.com/#integration-testing-test-keys), if there's no response within the timeout limit, log a message in Logstash, emit an event to Prometheus, and fallback to FancyCAPTCHA.
Option 2: Track errors and successes in Memcache
- Keep track of request timeouts in a global Memcache key with a low TTL (30 minutes?). If there are more than N number of errors, fall back to FancyCaptcha on page load, and generate alerts for further review and possible manual disabling.
- Keep track of successful siteverify calls in a global Memcache key with somewhat higher TTL (3 hours?). If there are zero successes, fall back to FancyCaptcha on page load, and generate alerts for further review and possible manual disabling.
Acceptance criteria
- A plan exists for how to automatically fallback to FancyCAPTCHA when needed