KatInterview

Design a Fleet-Wide Maintenance Orchestrator

System DesignModel answer
MediumModel answerSystem Designdistributed-systemsorchestrationstate-management

Last updated

Design a system to coordinate safe, rolling maintenance operations across thousands of machines while preserving availability and handling failures.

Problem

Design a maintenance orchestration system for a large-scale compute cluster with 10,000 GPU-equipped machines. The system must coordinate phased maintenance operations (firmware updates, kernel patches, hardware checks) across the fleet without causing service disruptions.

Functional Requirements

Your system must:

  1. Maintain availability: Keep at least 20% of the fleet operational and healthy throughout the maintenance window
  2. Coordinate operations: Manage concurrent maintenance tasks with configurable limits to prevent overload
  3. Verify readiness: Check that each machine is ready before starting maintenance and confirm it's healthy afterward
  4. Handle failures: Detect and respond to machines that don't complete maintenance within expected timeframes

Design Scope

Address these areas in your design:

  • System components: What services and data stores does your orchestrator need?
  • State tracking: How do you model and persist the maintenance status of 10,000 machines?
  • Control plane API: What operations does the system expose to operators?
  • Safety mechanisms: How do you prevent capacity violations and cascading failures?
  • Fault tolerance: What happens if the orchestrator itself crashes mid-operation?

Given Primitives

Assume you have access to:

  • prepare_machine(machine_id) – drains workloads from a machine
  • execute_maintenance(machine_id) – performs the actual maintenance (reboot, firmware flash, etc.)
  • get_machine_health(machine_id) – returns current machine status and diagnostics

Constraints

  • Maintenance on a single machine takes 10-30 minutes depending on workload drain time
  • The fleet is organized into physical racks and network pods with shared failure domains
  • Operators need visibility into progress and the ability to pause or abort operations

Hints

Hint 1

Think about what happens if your orchestrator crashes halfway through - how do you ensure each machine is maintained exactly once?

Hint 2

The 20% floor is a safety constraint, but you probably want much tighter operational limits to reduce blast radius

Hint 3

Consider failure domains like racks and network pods - what could go wrong if you maintain too many machines in the same domain simultaneously?