Skip to the page
Tecyfy

Azure interview question · medium

Compute instances vs. compute clusters in AML. When is each appropriate?

The short answerA compute instance is a single managed virtual machine for one person to develop on interactively; a compute cluster is a pool of machines that scales up for jobs (training, tuning and batch scoring) and back down to zero when idle.

The full answer

A compute instance is a single managed virtual machine for one person to develop on interactively; a compute cluster is a pool of machines that scales up for jobs (training, tuning and batch scoring) and back down to zero when idle.

Compute instances

  • A personal cloud workstation with JupyterLab, VS Code integration, and ML packages and GPU drivers preinstalled.
  • Use it for: writing and debugging code, exploring data, prototyping models, and small training runs. It can also run jobs as a single-node training target.
  • Cost control: schedules to start and stop it, and idle shutdown, because it bills while running even when nobody is using it.
  • Limits: one node, so no distributed training, and it is tied to one user.

Compute clusters

  • A managed cluster of CPU or GPU virtual machines that runs submitted jobs, scaling between a minimum and maximum number of nodes.
  • Use it for: training on large data, distributed training across nodes, hyperparameter sweeps that run many trials in parallel, pipeline steps, and batch endpoints for scoring large datasets.
  • Cost control: set the minimum nodes to 0 so it releases nodes when no jobs run, and use low-priority VMs for work that can tolerate being pre-empted.
  • Trade-off: jobs may wait a few minutes while nodes start.
Compute instanceCompute cluster
NodesOneOne to many, autoscaled
Used byOne developer, interactivelyJobs from anyone with access
Best forNotebooks, debugging, prototypingTraining, sweeps, pipelines, batch scoring
Idle costUntil stopped (use schedules, idle shutdown)None with minimum nodes 0

Two related options

  • Serverless compute: submit a job without creating a cluster at all; Azure Machine Learning provisions and releases the machines. Microsoft now suggests it instead of creating clusters for many cases.
  • Real-time serving doesn't use either: deploy models to managed online endpoints (or Kubernetes online endpoints) instead.

A typical workflow Develop on a compute instance, submit training and tuning as jobs to a cluster or serverless compute, then deploy the chosen model to an online or batch endpoint.

Last updated 16 October 2026