Design a Cluster Job Scheduler Like Borg for Mixed Workloads

Last updated: November 29, 2026

Quick Overview

Design a cluster manager that places long-running services and batch jobs onto tens of thousands of machines in a cell, honoring resource requests, priorities, and failure domains, and preempting low-priority work when needed.

Google
System Design
Software Engineer
Google
November 29, 2026
Software Engineer
Onsite
System Design
Hard

0

0

0 solved


Design a cluster manager that places long-running services and batch jobs onto tens of thousands of machines in a cell, honoring resource requests, priorities, and failure domains, and preempting low-priority work when needed.

Borg is foundational at Google and its design ideas (cells, priority bands, preemption, overcommit) often appear in infrastructure onsite rounds. The interviewer wants scheduling algorithm depth plus a credible control-plane architecture that survives its own failures.

What the Interviewer Expects
  • Describe a replicated control plane and per-machine agents
  • Explain feasibility checking and scoring for placement
  • Handle priority bands and preemption with limits on churn
  • Spread replicas across failure domains
  • Discuss resource reclamation and overcommit for batch
Key Topics to Cover
bin packing
preemption
failure domains
resource reclamation
control plane
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you keep scheduling latency low for a 10,000-task job?
  • How do you avoid one preemption causing a cascade?
  • What happens when the control plane is down?
  • How would you schedule a job that needs specific hardware like GPUs?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements
  • Jobs consist of N identical tasks with CPU, memory, disk, and optional constraints (machine type, accelerators, zone).
  • Priority bands: production, batch, best effort. Production should almost neve...
High-Level Design
  • Master (replicated, 5 replicas with Paxos): stores desired state of jobs and tasks and machine state. One elected leader serves writes.
  • Scheduler: separate process reading pending tasks fr...

Submit Your Answer
Markdown supported