Failover Is Allowed Despite a Standby Network Outage or Replication Lag
Level 2 · node · Reliability · Treating mandatory failover readiness conditions as alternatives
Scenario
A fictional logistics control service switches traffic to a standby server when its primary server fails. Before switching, it checks standby storage health, network connectivity, and replication lag. A healthy storage device alone is not enough: an unreachable standby or one with excessive replication lag must not receive traffic. The current readiness API incorrectly marks some unsafe standby servers as ready. Trace the repository, readiness service, and controller to inspect how the conditions are combined.
Requirements
Mark a standby ready only when its storage is healthy, its network is reachable, and replication lag is no greater than the configured maximum. Lag exactly equal to the maximum is allowed. Reject failover if any of these three conditions is not met. Return HTTP 404 for an unknown standby and preserve the existing response structure for known standbys.
Acceptance criteria
- A standby with healthy storage, reachable network, and lag within the limit is ready.
- A storage failure prevents readiness even when the other checks pass.
- A disconnected network prevents readiness even when replication lag is small.
- Replication lag beyond the limit prevents readiness even when the network is connected.
- Looking up an unknown standby returns HTTP 404.