Skip to the page
Tecyfy

Databricks interview question · easy

How do you set up and manage clusters in Databricks?

The short answerYou create and manage clusters on the Compute page of a Databricks workspace (or through the API, CLI or Terraform), choosing the runtime, machine types, size, access mode and auto termination; admins then control what users may create with compute policies.

The full answer

You create and manage clusters on the Compute page of a Databricks workspace (or through the API, CLI or Terraform), choosing the runtime, machine types, size, access mode and auto termination; admins then control what users may create with compute policies.

Creating a cluster

Open Compute, choose Create compute, and set:

  • Policy: most users create compute through a policy, which fixes or limits the other settings.
  • Databricks Runtime version: prefer a current LTS (long-term support) version. ML runtimes add machine learning libraries.
  • Access mode: Standard (shared by several users, with data isolation between them; Databricks' recommended default) or Dedicated (for one user or group, needed for some features). These replaced the older "shared", "single user" and "no isolation" modes.
  • Single node or multi node: single node for small data and non-distributed work; multi node for Spark jobs on large data.
  • Worker and driver types: memory-, compute- or storage-optimised machines, and Photon acceleration if wanted.
  • Autoscaling: a minimum and maximum number of workers.
  • Auto termination: minutes of inactivity before the cluster shuts down, so idle compute stops costing money.
  • Tags for cost reporting, and under advanced options Spark settings, environment variables and init scripts.

Managing clusters

  • Start, restart, edit and terminate from the Compute page. A restart applies configuration changes.
  • Permissions: grant users Can attach to, Can restart or Can manage.
  • Monitoring: the cluster's metrics, event log, driver logs and the Spark UI show load, failures and slow stages.
  • Libraries: install them on the cluster, or better in notebooks with %pip so code carries its own dependencies.
  • Cost: use jobs compute (created per run and terminated afterwards) for scheduled work, keep all-purpose clusters for interactive use, and watch spending in the billing system tables.

Choosing the type of compute

  • All-purpose compute: interactive notebooks, shared by a team.
  • Jobs compute: scheduled and production jobs.
  • Serverless compute: Databricks manages the machines, starts in seconds and scales automatically; often the simplest choice for notebooks, jobs and pipelines.
  • SQL warehouses: SQL queries, dashboards and BI tools.

A good answer mentions policies, access modes and auto termination, because those are what keep shared workspaces secure and costs under control.

Last updated 16 October 2026