Deterministic Host Leases for FastAPI Live Polls Prevent Split-Brain Reassignment
The article describes a split-brain problem in live polls where two browser clients may both believe they are the host after a disconnect. It proposes a server-side host lease with a monotonically increasing epoch so that only the current epoch can issue authority-changing commands. Host candidates are chosen from an ordered, eligibility-checked set, and reassignments are committed atomically so every worker contends on one authoritative record. Clients treat broadcasts as views of committed state rather than grants, and reconnects restore sessions without restoring authority from local state. The approach is designed to keep reassignment deterministic even when WebRTC messages arrive late, duplicated, or out of order.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in