Design a compute cluster control plane
PremiumDistributed infrastructureHard
- Leader election
- Fencing tokens
- Raft
Quick answer
This distributed infrastructure interview question asks you to design a compute cluster control plane. Aim for a design that keeps working across many machines and failures, then explain partitioning, replication, coordination and trade-offs. Interviewers want to see how you reason about failures, consistency and scale.
The problem
Design a compute cluster control plane that tracks the live state of 50,000 hosts and dispatches jobs onto them, like the control plane of a cluster manager. The hard parts are heavy concurrent state writes, and keeping work running through host, network and coordinator failures without running a task twice.
Each host runs an agent that reports free CPU, memory and GPUs and the status of its tasks. Users submit jobs made of tasks, each with resource needs. The control plane stores what should run (desired state) and what is running (actual state), picks a host for each task, tells the agent on that host to start it, and restarts tasks when hosts die. One coordinator (the leader) makes placement decisions, and it can crash or be cut off from the network at any time.
What must a compute cluster control plane do?
- Host state: Every agent reports resources and task status, and the control plane keeps a current view of the health and free capacity of each host.
- Job dispatch: Accept jobs, place each task on a host with enough free resources, and tell the agent on that host to start it.
How well must it do it?
- No overcommit: A host never has more resources assigned than it has, even when two placements race for it.
- Single leader: Agents and the state store never act on commands from two leaders at once.
What scale should you design for?
Use these numbers in your estimates.
The scale numbers unlock with this questionUnlock
Key concepts
- Leader election
- Fencing tokens
- Raft
- Heartbeats
- Host leases
- Compare and set
How you’ll practise
- Requirements
- Estimate
- Data model and API
- Partitioning and replication
- Consistency and failures
- Wrap-up
Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.
What do interviewers look for?
In any distributed infrastructure design round.
- States the consistency and availability guarantees up front
- Explains partitioning and replication choices
- Describes how nodes agree and recover after failures
- Handles network partitions and slow nodes
- Plans for adding and removing capacity safely
- Names the trade-offs instead of hiding them
Questions people ask about this interview question
- Which design type is this question?
- It is a distributed infrastructure question. You design a compute cluster control plane and explain your choices the way you would in an interview.
- Is this question asked at entry level?
- It is marked Hard. It suits engineers preparing for senior interviews, where you are expected to drive the discussion and go deep on trade-offs.
- What should I cover first?
- Start with the guarantees the system must give and the failures it must survive. Agree on scope with the interviewer before you design anything.
- Can I practise it for free?
- It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.
Related questions
Updated · Written by the SevyDevy team