RFC 0002: Active/passive Fleet HA for real-time control - #740
Conversation
🔐 Codex Security Review
Review SummaryOverall Risk: HIGH Findings[HIGH] Authoritative review diff appears incomplete
NotesWithin the visible authoritative diff, the only reviewed content is Generated by Codex Security Review | |
There was a problem hiding this comment.
Pull request overview
This PR adds RFC 0002, proposing an active/passive high-availability installation mode for Proto Fleet focused on preserving real-time control correctness and fast recovery (single-active control plane, Patroni-backed DB HA, and a Fleet-owned active lease), while explicitly allowing degraded behavior for history/observability subsystems.
Changes:
- Defines the HA contract boundary (critical control vs real-time runtime vs best-effort history vs local artifacts) and the supported 3-host topology (2 app/DB + 1 witness).
- Specifies the separation of concerns for HA correctness: Patroni DB primary election, Fleet DB-backed active lease for single-active runtime, and endpoint routing via
/health/active(VIP/keepalived on-prem or cloud LB). - Outlines runtime gating, health surfaces, failure behavior, and validation gates/phased rollout for eventual implementation.
752e066 to
6b4952e
Compare
6b4952e to
3e30fd6
Compare
875f898 to
de41691
Compare
de41691 to
b371ff0
Compare
b371ff0 to
71ff8af
Compare
0f4ebb5 to
577e57d
Compare
577e57d to
da0b851
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da0b851eb1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
da0b851 to
04a668b
Compare
04a668b to
67e33a0
Compare
67e33a0 to
1910088
Compare
1910088 to
d21e4f4
Compare
mcharles-square
left a comment
There was a problem hiding this comment.
This approach looks pretty good! As discussed, would like to ensure that we handle stopping jobs cleanly when we fail over
Signed-off-by: Ankit Goswami <ankitg@squareup.com>
Signed-off-by: Ankit Goswami <ankitg@squareup.com>
Reviewable diff: +419/-0 across 1 files (excludes generated, test, and story files).
Summary
This is an RFC-only PR. Please review it as an architecture and scope decision for the future HA implementation, not as an implementation diff.
The most useful feedback is on whether the proposed contract is correct, simple enough to deploy, and explicit about failure behavior. Nits on exact installer flags, Patroni timing values, file names, and low-level implementation APIs can wait for implementation PRs unless they expose a flaw in the RFC's contract.
Suggested review path
Decision summaryHA contractArchitectureStable endpointDatabase layerFleet activenessHealth and operator statusDeployment modelFailure behavior/Validation gatesAlternatives considered/Unresolved questionsReviewer focus
Out of scope for this PR
Areas of the code involved
docs/rfcs/0002-active-passive-fleet-ha.mdKey technical decisions & trade-offs
Testing & validation
No runtime tests were run; this is a documentation-only RFC.
The RFC defines the validation gates required before HA can be marked supported: active/passive fencing, DB failover, quorum behavior, VIP movement and VIP-loss fencing, ControlStream reconnect behavior, MQTT intake recovery, critical-write durability while replication is healthy, degraded-mode HA status/alerts, and authenticated HA diagnostics.