ENG-12238: document Reflex app scaling and recovery
This adds the scaling guide to the existing documentation, covering replaceable backends, durable report jobs, regional session state, primary/read-replica routing, Redis recovery, and OpenTelemetry compatibility.
The architecture and job-lifecycle diagrams distinguish request, replication, and queue traffic. Redis guidance uses an ordinary provider-managed failover endpoint. The runnable Reflex state/UI example preserves retry keys, reads authorized status, and rejects stale responses. Report selection is tied to owner/session identity, and only an explicit New report action creates a key; Submit with no selected key recovers an existing job. Database/outbox/broker durability remains an explicit application contract.
The guide separates persisted-state and frontend compatibility hashes, links to the canonical self-hosting migration warning, and gives the dependency constraints for reflex-otel==0.2.0. Full-size diagram links work with both an empty frontend path and /docs.
Validation:
- Docs CI passed on this head's merge ref: 703 passed, 69 skipped, 6 xfailed, including all 29 extracted-example cases. The complete local locked Python 3.12 suite also passed with default plugins: 698 passed, 65 skipped, 6 xfailed. These exercise frontend compilation, retries/recovery, stale responses, account switches, same-owner relogin, logout cleanup, explicit new requests, and execution after other documentation examples. The harness uses
asyncio.run, so no async pytest plugin is needed. - State/schema checks: 13 passed.
- Browser preview at 1440px and 390px: full-size SVG links return the expected assets; code and diagrams stay within the page width.
- Built wheel, sdist, and isolated installed guide match the source bytes. 72 focused MCP/catalog tests pass against the candidate bundle, using model doubles rather than live relevance calls. Nine offline queries, including Redis failover and Redis Sentinel, run singly and in batches of five/four; they verify query forwarding and full-body hydration, not live relevance.
- Explicit type checking of the example tests passes. Full local pre-commit reproduces six unchanged macOS CPU-affinity errors; all other hooks and the generated-stub check pass. All 12 required checks passed on head
718849767258323166e9a2edc68d233e04504d60, including Linux pre-commit. - Production docs integration CI passed on this head with Python 3.11 and 3.12: production client/SSR builds,
/hosting/scalingprerendering, 23 sitemap/SEO checks, and five frontend regressions per job.
MCP rollout sequencing: Flexgen PR #6287 is already merged and still pins the earlier e29bd80cd bundle. The fixture follow-up remains local. After the source revision is approved, update the real dependency pin and lock together with that fixture, reinstall from the lock, and rerun bundled-guide retrieval checks. Publishing the website alone does not refresh MCP.