Design a Fleet OS Validation State Store
Store strongly consistent OS-validation results so fleet-management decisions remain correct through writer, leader, and replica failures.
Problem statement
For this exercise, assume an infrastructure fleet runs an OS-validation agent before a host may receive production workloads. Validation services write versioned results for each host and image, while fleet-management services read the current eligibility state, query cohorts, and watch changes.
A host is eligible only when the latest required validation set for its intended image has passed and has not expired or been revoked. Retried reports, concurrent validators, stale agents, primary or replica failures, and network partitions must not roll state backward or let an invalid host appear eligible.
Design the database and service boundary, data model, write and read contracts, indexing, replication, consistency, transactions, quorum or consensus behavior, failure recovery, and audit. Agent implementation, OS installation, workload scheduling, and the validation tests themselves are outside scope.
What to build
- Authorized validators can idempotently record immutable test results for a host, image, validation set, and execution generation.
- The service derives and serves one authoritative current eligibility state without allowing stale or incomplete results to make a host eligible.
- Fleet managers can read one host, query bounded cohorts, and consume ordered eligibility changes with visible freshness.
- Operators can revoke a validation or image, explain every eligibility decision, and recover state from immutable evidence.
At scale
- For this exercise, assume five million hosts, 200,000 validation-result writes per second during rollout peaks, and one million point reads per second.
- Return a strongly consistent single-host eligibility read within 100 milliseconds p95 in-region and make ordinary cohort indexes current within two seconds p95.
- An acknowledged validation result and eligibility transition must survive a zone failure, and failover must not admit two unfenced leaders.
- Retain immutable result and decision history for one year and support revoking an image across one million hosts within five minutes.