Sub topic 3
Control Plane and Compute Plane
This chapter assumes you know the lakehouse idea from earlier chapters. It also assumes you know what cloud object storage and virtual machines are, and you can read basic SQL and Python. Here you will learn how Databricks splits its architecture in two, where your code and data live, and which errors come from that split.
Why the platform has two planes
A Databricks workspace feels like one product. Behind it, the work is divided between two environments.
- The control plane is the backend that Databricks runs in its own cloud account. It hosts the web application, the REST APIs, the notebook and job definitions, the cluster manager, and the Unity Catalog metastore service.
- The compute plane is where data processing runs. This is the set of virtual machines that run Apache Spark, along with the networking around them.
Think of the control plane as the place where you describe and manage work, and the compute plane as the place where the work runs.
What lives where
| Item | Control plane | Compute plane | Your cloud storage |
|---|---|---|---|
| Web UI and REST API | Yes | No | No |
| Notebook source code and job definitions | Yes (encrypted) | No | No |
| Cluster configuration and scheduling | Yes | No | No |
| Unity Catalog metadata (names, permissions) | Yes | No | No |
| Spark driver and worker processes | No | Yes | No |
| Data being processed in memory | No | Yes | No |
| Delta table files (Parquet and logs) | No | Reads and writes | Yes |
The key point is that table data stays in storage that you own, and processing happens on machines in the compute plane. The control plane holds metadata and instructions. Some small outputs do pass through the control plane. For example, the rows that display() shows in a notebook are sent to your browser through it.
Two kinds of compute plane
Databricks offers two models. They differ in whose cloud account hosts the virtual machines.
Classic compute plane
In classic compute, the virtual machines run in your cloud account, inside a virtual network that you control. Databricks creates and removes machines there on your behalf by using permissions you grant. You see them in your cloud console, and your own network rules, such as security groups and routes, apply to them.
Serverless compute plane
In serverless compute, the machines run in a compute plane inside the Databricks account. You do not choose instance types or manage a network for them. Databricks starts capacity quickly and manages the infrastructure, and you are billed for use. The trade-off is that you have less direct control over networking. Reaching a private data source needs configuration that Databricks provides for serverless, not your own network settings.
| Question | Classic | Serverless |
|---|---|---|
| Whose account hosts the VMs? | Yours | Databricks |
| Who manages the network? | You | Databricks, with controls you configure |
| Typical start time | Minutes | Seconds |
| Instance type choices | Yours | Managed by Databricks |
A request, step by step
The diagram shows what happens when you run a notebook cell on classic compute.
Note that the cluster does not read data through the control plane. It asks Unity Catalog whether you may access the table, receives a short-lived credential, and then reads storage directly. Metadata travels through the control plane, and bulk data does not.
Where the planes meet your cloud
Two connections are worth knowing, because most setup problems occur there.
- Control plane to compute plane. In classic compute, the cluster machines must be able to reach the control plane to receive commands and report status. A common design is secure cluster connectivity, in which the cluster machines have no public IP addresses and open no inbound ports. The machines initiate an outbound connection to the control plane. If your network blocks that outbound traffic, clusters fail to start.
- Compute plane to storage. Machines read and write table files in object storage. They need network access to the storage service and credentials that allow it. Unity Catalog supplies those credentials through storage credentials and external locations.
Checking the connection from a notebook
You can inspect your environment from a notebook attached to compute. This code reads a few settings that identify the workspace and the cluster. Run it in a Python notebook cell.
workspace_url = spark.conf.get("spark.databricks.workspaceUrl")
cluster_id = spark.conf.get("spark.databricks.clusterUsageTags.clusterId", "n/a (serverless)")
print("Workspace URL:", workspace_url)
print("Cluster ID:", cluster_id)
# Which Spark version is running on the compute plane?
print("Spark version:", spark.version)On serverless compute the cluster tag may not exist, so the second call supplies a default value instead of raising an error. The point of the exercise is that the notebook UI lives in the control plane, while spark is a session running on machines in the compute plane.
Common errors and what they mean
- Cluster stays in "Pending" and then fails. In classic compute, this usually means the cloud account lacks quota for the requested instance type, or the network blocks traffic to the control plane. Check the termination reason on the cluster page.
- A table query fails with a permission error although the notebook opens fine. Opening a notebook is a control plane action. Reading a table also needs Unity Catalog privileges and storage access. Seeing the notebook does not prove you can read the data.
- A job works on classic compute and fails on serverless. Serverless runs in a different network. Access to private resources, such as a database inside your virtual network, needs extra configuration.
- You cannot find cluster machines in your cloud console. If you use serverless, the machines are in the Databricks account and do not appear in yours.
Security consequences
The split gives a clear way to reason about risk.
- Your data files stay in your storage, so you control encryption keys and bucket policies there.
- The control plane stores notebook code and metadata. Do not paste secrets such as passwords into notebooks. Use Databricks secrets instead, which keep values out of the code.
- Network isolation for classic compute is your responsibility, within the options Databricks supports.
Choosing between classic and serverless
Use these criteria when you decide.
- Choose serverless when you want fast start-up, less administration, and your data sources are reachable with the options Databricks offers for serverless.
- Choose classic when you need specific instance types, custom libraries or images that serverless does not support, or direct control of the network path to private systems.
Neither choice changes where table data lives. In both models, the data remains in your cloud storage.
Exercise
A teammate says, "All our table data is stored in the Databricks control plane, so we cannot control its encryption." Correct this statement, and name one thing that does live in the control plane.
Show answer
Table data is stored as Delta files in your own cloud object storage, so you control its encryption keys and access policies there. Processing runs in the compute plane. The control plane holds things such as notebook source code, job definitions, cluster configuration, and Unity Catalog metadata.
Exercise
A classic cluster fails to start, and the termination reason points to a connection problem with Databricks services. Which connection is most likely blocked, and who is responsible for fixing it?
Show answer
The outbound connection from the cluster machines in the compute plane to the control plane is most likely blocked. In classic compute the network belongs to your cloud account, so your team must change the firewall or routing rules to allow it.
Exercise
A query on a Unity Catalog table fails with a permission error, but you can open the notebook and attach it to a running cluster. Why do these two facts not conflict?
Show answer
Opening the notebook and attaching compute are control plane actions that depend on workspace permissions. Reading the table requires separate Unity Catalog privileges (USE CATALOG, USE SCHEMA, SELECT) and access to the underlying storage. You can have the first without the second.