Design a credit-based GPU scheduling system
PremiumDistributed infrastructureHard
- Gang scheduling
- Preemption
- Checkpointing
Quick answer
This distributed infrastructure interview question asks you to design a credit-based GPU scheduling system. 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 credit-based GPU scheduling system for a shared 4,096-GPU cluster where 60 teams spend monthly credit budgets next to production inference. The hard parts are placing big all-or-nothing jobs, preempting with little lost work, and charging every GPU-minute exactly once.
Dozens of research and product teams share the cluster. Each team receives a monthly budget of credits, where one credit buys one GPU-hour at the standard training price. Teams submit jobs that range from a single-GPU notebook to a 2,048-GPU pre-training run, and production inference services draw GPUs from the same pool. The system decides which jobs run, where they run, which jobs are preempted when more important work arrives, and how every GPU-minute is charged against a budget.
The hard parts are the conflicts. Large training jobs need hundreds of GPUs at the same moment on well-connected hardware, while a steady stream of small jobs keeps fragmenting free capacity. Teams want guaranteed capacity, yet guaranteed capacity that sits idle wastes the most expensive hardware in the company. Preempting a job throws away the work done since its last checkpoint. The credit ledger must stay exact even when node agents crash, retry or report late. This question has been reported at Anthropic in candidate interviews for infrastructure roles.
What must a credit-based GPU scheduling system do?
- Budgets: Admins grant each team a monthly credit budget, which the team splits across its projects; every project can see its balance, holds and spend.
- Priority and preemption: Higher-priority work can displace lower-priority work, and displaced jobs get a warning signal and time to checkpoint before they are stopped and requeued.
How well must it do it?
- Billing integrity: No usage minute is lost or charged twice; usage, allocations and ledger reconcile hourly to within 0.1%.
- Scheduling latency: p99 of 2 seconds from submission to placement for jobs of 8 GPUs or fewer when free capacity exists; 30 seconds for multi-node jobs when capacity exists.
What scale should you design for?
Use these numbers in your estimates.
The scale numbers unlock with this questionUnlock
Key concepts
- Gang scheduling
- Preemption
- Checkpointing
- Fair share
- Double entry ledger
- Topology aware placement
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 credit-based GPU scheduling system 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