← Together AI Interview Insights

Together AI·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Apr 2026

Summary

System design round at Together AI for a software engineer role. The whole thing was a deep dive into building a GPU-aware pod scheduler from scratch, and they really pushed on every layer of it.

Questions Asked (5)

Q1

Design an object-oriented, GPU-aware pod scheduler and cluster manager. Nodes track total GPUs and running pods, pods track GPU requirements. Implement APIs for adding/removing nodes and pods, scheduling a pod to a node with sufficient free GPUs, and querying utilization and listings.

System DesignAlgorithms & Data StructuresData Modeling
Author's notes

This was the core question and it took the whole session.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design core classes (Node, Pod, Scheduler, ClusterManager) with clear responsibilities and efficient data structures for GPU tracking. Implement scheduling logic that finds a node with sufficient free GPUs, and expose APIs for adding/removing nodes and pods, querying utilization, and listing resources.

Pro tip: Mention that GPU allocation must be atomic and thread-safe to avoid race conditions in concurrent scheduling, and discuss how to handle fragmentation by potentially bin-packing or spreading pods based on policy.

1. Clarify Requirements and Scale

Ask about expected number of nodes/pods, concurrency needs, and whether scheduling should be first-fit, best-fit, or policy-driven. Confirm if GPU types or other constraints matter.

2. Design Core Classes and Data Structures

Define Node (total GPUs, used GPUs, list of pods), Pod (GPU requirement, assigned node), Scheduler (scheduling algorithm), and ClusterManager (collections of nodes and pods). Use efficient structures like a free-GPU index or priority queue for fast lookup.

3. Implement Scheduling Algorithm

For a pod, iterate over nodes to find one with free GPUs >= requirement. Consider first-fit for simplicity or best-fit to reduce fragmentation. Ensure atomic allocation to prevent overcommitment.

4. Define APIs and Concurrency Handling

Provide methods: addNode, removeNode, addPod, removePod, schedulePod, getUtilization, listNodes, listPods. Use locks or concurrent data structures to make operations thread-safe.

5. Discuss Extensions and Trade-offs

Talk about handling node failures, pod preemption, GPU sharing, and scaling to multiple schedulers. Mention monitoring and metrics for utilization.

Key Points to Mention

  • Node and Pod class design with GPU tracking (total, used, free)
  • Scheduling algorithm: first-fit vs best-fit and its impact on fragmentation
  • Thread safety and atomic allocation to avoid race conditions
  • API design for CRUD operations and queries (utilization, listings)
  • Handling node removal with running pods (rescheduling or draining)
  • Potential extensions: GPU types, preemption, multi-scheduler scaling

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

What placement strategy would you use for scheduling pods onto nodes, and how do you justify that choice? Walk through how your indexes get updated on every add, remove, schedule, and evict operation.

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

The index update part is where I felt shaky.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the placement strategy as a multi-objective optimization problem balancing resource utilization, fault tolerance, and performance. Then, describe a concrete strategy (e.g., bin packing with spreading constraints) and justify it with trade-offs. Finally, walk through the index update mechanisms for each operation, emphasizing consistency and efficiency.

Pro tip: Mention that you would use a combination of hard constraints (e.g., anti-affinity) and soft preferences (e.g., least-requested) to handle diverse workloads, and highlight how you would measure and iterate on the strategy using metrics like scheduling latency and cluster utilization.

1. Define objectives and constraints

Clarify the goals: maximize resource utilization, ensure high availability, minimize latency, and respect constraints like affinity/anti-affinity, taints/tolerations, and topology spread. Consider workload types (e.g., latency-sensitive vs. batch).

2. Propose a placement strategy

Choose a strategy such as bin packing (e.g., MostAllocated) for high utilization or spreading (e.g., LeastAllocated) for fault tolerance. Justify based on workload characteristics and trade-offs between efficiency and resilience.

3. Explain index updates for add/remove

Describe how indexes (e.g., node resource availability, pod-to-node mapping) are updated when pods are added or removed. Emphasize atomic updates and consistency, possibly using a centralized scheduler with a cache.

4. Explain index updates for schedule/evict

Detail how scheduling a pod updates indexes (e.g., decrement available resources, update affinity maps) and how eviction triggers re-scheduling and index rollback. Mention handling of preemption and graceful termination.

5. Discuss consistency and scalability

Address how to maintain index consistency across concurrent operations, possibly using optimistic concurrency or locking. Discuss scaling the scheduler horizontally and partitioning the cluster if needed.

Key Points to Mention

  • Bin packing vs. spreading strategies and their trade-offs
  • Kubernetes scheduler framework and plugins (e.g., NodeResourcesFit, PodTopologySpread)
  • Index structures: node resource maps, pod affinity/anti-affinity indexes, and pod-to-node assignments
  • Atomicity and consistency in index updates during concurrent scheduling
  • Handling of eviction and preemption, including index rollback and re-scheduling
  • Metrics for evaluating placement strategy: scheduling latency, cluster utilization, and application performance

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

How would you handle concurrency, specifically simultaneous pod scheduling requests and node additions? What guarantees do you provide around idempotency and failure handling?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

Talked about per-node locks versus a global scheduler lock and the tradeoffs.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system context and requirements, then describe a layered approach using optimistic concurrency control, idempotent operations, and robust failure handling. Emphasize trade-offs and how you would validate the design under concurrent scenarios.

Pro tip: Mention that you would use Kubernetes' built-in mechanisms like resource versions and finalizers, but also discuss how you'd handle edge cases such as partial failures and retries with exponential backoff.

1. Clarify Requirements and Constraints

Ask questions to understand the scale, latency requirements, and consistency guarantees needed. Identify if the system is Kubernetes-based or custom.

2. Design for Concurrency Control

Use optimistic concurrency (e.g., resource versions) to detect conflicts, and implement a queue or lock manager for serializing critical sections if needed.

3. Ensure Idempotency

Make all operations idempotent by using unique request IDs, deduplication caches, and designing APIs that can be safely retried.

4. Implement Failure Handling

Use retries with exponential backoff, circuit breakers, and dead-letter queues. Ensure operations are atomic or have compensating transactions.

5. Validate and Monitor

Describe how you would test concurrency with stress tests and monitor for conflicts, failures, and performance bottlenecks.

Key Points to Mention

  • Optimistic concurrency control using resource versions or ETags
  • Idempotent API design with request IDs and deduplication
  • Retry mechanisms with exponential backoff and jitter
  • Use of Kubernetes primitives like finalizers and owner references
  • Trade-offs between consistency, availability, and latency
  • Monitoring and alerting for concurrency conflicts and failures

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

Write pseudocode for the schedule_pod function using your chosen placement strategy. Include time and space complexity analysis for each API.

Algorithms & Data StructuresSystem Design
Author's notes

Pseudocode was fine, I wrote it on the whiteboard pretty quickly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, briefly state your chosen placement strategy (e.g., best-fit, first-fit, or a custom heuristic) and justify it for Together AI's workload. Then, write clear pseudocode for schedule_pod, ensuring each API call is annotated with its time and space complexity. Finally, discuss trade-offs and potential optimizations.

Pro tip: Demonstrate awareness of real-world constraints by mentioning how your strategy handles dynamic pod arrivals and failures, and how it scales with cluster size. Also, explicitly state assumptions about data structures (e.g., heaps, balanced trees) that enable efficient operations.

1. State and Justify Placement Strategy

Clearly name your strategy (e.g., best-fit decreasing, least-requested, or spread) and explain why it suits Together AI's needs (e.g., minimizing fragmentation, balancing load, or reducing latency).

2. Define Data Structures and Assumptions

Specify the data structures used (e.g., priority queues, maps) and any assumptions about the cluster state (e.g., number of nodes, pod resource requirements).

3. Write Pseudocode for schedule_pod

Provide clear, language-agnostic pseudocode for the function, including input parameters (e.g., pod, node list) and output (e.g., assigned node or failure).

4. Analyze Time and Space Complexity

For each API call within schedule_pod, state its time and space complexity in terms of relevant variables (e.g., n = number of nodes, m = number of pods).

5. Discuss Trade-offs and Optimizations

Mention potential improvements (e.g., caching, incremental updates) and how the strategy performs under different workloads.

Key Points to Mention

  • Choice of placement strategy and its rationale (e.g., best-fit to reduce fragmentation).
  • Data structures used (e.g., min-heap for node selection) and their impact on complexity.
  • Time complexity of each API call (e.g., O(log n) for heap operations, O(n) for scanning).
  • Space complexity of the algorithm (e.g., O(n) for storing node states).
  • Handling of edge cases (e.g., no available nodes, pod too large).
  • Scalability considerations (e.g., how the algorithm performs with thousands of nodes).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

How would you handle edge cases like a pod requiring more GPUs than any single node has, or fragmentation where many small pods occupy a large node leaving no contiguous capacity for a bigger pod?

System DesignTechnical Trade-offsAdaptability & Ambiguity
Author's notes

The fragmentation one is genuinely interesting because GPU scheduling doesn't have the same physical contiguity constraint as memory paging, so I pushed back a little and said fragmentation here is more about count than layout.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that these are classic scheduling challenges in GPU clusters and that there's no single perfect solution—only trade-offs. Then walk through a layered strategy: first, handle the multi-node GPU requirement via distributed scheduling and gang scheduling; second, address fragmentation with bin-packing, defragmentation, and preemption. Finally, tie it back to Together AI's scale and the need for a balance between utilization and fairness.

Pro tip: Mention that you'd measure the impact of each strategy with metrics like scheduling latency, GPU utilization, and job success rate—showing you think in terms of continuous improvement, not just one-off fixes.

1. Clarify the problem and constraints

Restate the two edge cases to ensure understanding, and note that they require different but related solutions. Ask about workload characteristics (e.g., typical GPU counts per pod, job durations) if not provided.

2. Handle multi-node GPU pods

Explain that pods needing more GPUs than a single node has must be scheduled across multiple nodes using gang scheduling to ensure all-or-nothing placement. Mention technologies like Kubernetes with device plugins, Volcano, or custom schedulers that support co-scheduling.

3. Address fragmentation with bin-packing and defragmentation

Describe using bin-packing algorithms to place pods efficiently and reduce fragmentation. For existing fragmentation, propose defragmentation strategies like descheduling and rescheduling small pods, or using preemption with priorities to free up contiguous capacity.

4. Balance trade-offs and implement safeguards

Discuss trade-offs: aggressive bin-packing may hurt fault tolerance or increase latency; preemption can disrupt lower-priority jobs. Suggest safeguards like quotas, priorities, and graceful eviction to maintain fairness and stability.

5. Monitor and iterate

Emphasize the need for observability: track GPU utilization, fragmentation metrics, scheduling delays, and job failures. Use this data to tune policies and potentially adopt dynamic strategies like topology-aware scheduling.

Key Points to Mention

  • Gang scheduling for multi-node GPU pods to avoid partial allocation and deadlocks.
  • Bin-packing and defragmentation techniques to reduce fragmentation and improve contiguous capacity.
  • Preemption with priorities to reclaim resources from lower-priority jobs when needed.
  • Trade-offs between utilization, fairness, and job latency.
  • Kubernetes ecosystem tools: device plugins, Volcano, Kube-batch, or custom schedulers.
  • Metrics and monitoring to validate and refine scheduling strategies.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.