Skip to article
Analytics Synapse Analytics

Synapse Spark pool

A Synapse Spark pool is the workspace compute definition Azure Synapse uses to start Apache Spark sessions. It records node size, node count, autoscale behavior, runtime version, packages, and idle timeout so notebooks, Spark jobs, and pipelines get repeatable distributed processing.

Source: Microsoft Learn - Apache Spark pool concepts - Azure Synapse Analytics Reviewed 2026-05-27T07:47:08Z

Exam trap
Treating the pool as a permanently running cluster and missing the session startup and idle timeout behavior.
Production check
Run az synapse spark pool list and verify every pool has an owner, environment tag, and current workload purpose.
Article details and learning context
Aliases
Apache Spark pool, Spark pool, Synapse Apache Spark pool, serverless Spark pool
Difficulty
fundamentals
CLI mappings
8
Last verified
2026-05-27T07:47:08Z
Review level
field-manual-complete
Article depth
field-manual-complete
Learning paths Graph Analytics concept cluster Synapse Spark pool

Understand the concept

In plain English

A Synapse Spark pool is the compute profile behind Spark work in Synapse. It is not a permanent cluster that always runs. It is a saved definition that tells Azure what Spark version, node size, node count, autoscale range, packages, and idle timeout to use when a notebook or Spark job starts. Learners should think of it as the runtime agreement between data engineering code and the Azure capacity that will execute it. Operators tune the pool so jobs start reliably, run fast enough, and stop wasting money.

Why it matters

Synapse Spark pools matter because they are where analytics design becomes capacity, runtime behavior, and cost. A pool that is too small creates slow transformations and failed notebooks; a pool that is too large burns budget during careless experiments. Runtime and package choices affect whether code behaves the same in development, test, and production. The pool becomes a shared dependency for many notebooks and pipelines, so a casual change can break several teams at once. Good pool design gives engineers predictable performance, gives operators clean monitoring points, gives finance a clear owner for Spark spend, and prevents invisible dependencies during staff changes.

Technical context

Inside a Synapse workspace, a Spark pool sits between authored artifacts and the data lake. Notebooks, Spark job definitions, and pipeline activities request Spark sessions from the pool, while the pool reaches storage through managed identity, linked services, networking, and library configuration. Its control-plane settings live with the workspace, but each session touches the data plane through ADLS Gen2, Delta, Parquet, or other connectors. Architects review Spark pools with workspace region, virtual network, private endpoints, Git artifacts, monitoring, and package supply-chain controls.

Exam context

Compare with

Where it is used

Where you see it

  1. In Synapse Studio, Spark pool settings show Spark version, node size, autoscale range, auto-pause timeout, packages, and configuration files before users attach notebooks or jobs. during workspace reviews.
  2. In Azure CLI, az synapse spark pool show returns the pool name, workspace, provisioning state, node family, Spark version, scaling configuration, and tags for inventory review. for change tickets.
  3. In pipeline and notebook run history, session startup delays, executor failures, library errors, and storage authorization messages often identify whether the selected Spark pool caused the problem.

Common situations

  • Separate production ETL notebooks from exploratory analysis so runtime changes, package experiments, and oversized sessions do not interrupt certified data pipelines.
  • Right-size autoscale limits for nightly Spark transformations that miss service-level deadlines during month-end data spikes.
  • Pin Spark runtime and library versions before migrating notebooks from dev to production or comparing Synapse Spark with Fabric Spark.
  • Reduce idle compute waste by shortening timeout settings for ad hoc pools while preserving longer sessions for heavy engineering jobs.
  • Create a controlled pool for sensitive lake folders where managed identity, storage ACLs, private networking, and package approval are reviewed together.

Illustrative Azure scenarios

These examples show how the concept can affect design and operations. They are illustrative scenarios, not customer claims.

Scenario 01 Wildfire model gets a dedicated Spark pool instead of borrowing analyst capacity Scenario, objectives, solution, measured impact, and takeaway.
Scenario

A state forestry agency ran daily wildfire spread simulations in shared Synapse notebooks. During wind events, analyst experiments and production weather joins competed for the same Spark capacity.

Goals
  • Finish the 04:00 fire-risk model before emergency briefings at 05:15.
  • Separate experimental notebooks from production geospatial transformations.
  • Reduce failed Spark sessions caused by package drift and pool contention.
  • Keep monthly Spark spend within the emergency analytics budget.
Approach using Synapse Spark pool

The platform team created a Synapse Spark pool dedicated to operational wildfire modeling. The pool used a pinned Spark runtime, approved geospatial libraries, a fixed minimum node count for the morning run, and autoscale for unusual weather days. Notebook authors moved experiments to a smaller ad hoc pool with a short idle timeout. Production notebooks were promoted through Git and attached only to the modeling pool. Azure CLI listed pool configuration in every release, waited for provisioning after changes, and exported evidence to the incident-readiness workbook. Storage access used the workspace managed identity with ACLs limited to weather, fuel, and boundary folders in ADLS Gen2.

Potential outcomes
  • The daily model completed by 04:47 on 28 of 30 high-risk days, compared with 17 of 30 before the redesign.
  • Session failures tied to missing packages fell from nine per month to one minor warning.
  • Exploration workloads stopped delaying emergency jobs because they ran on a separate pool.
  • Spark cost dropped 22% after idle exploration sessions were shortened without shrinking production capacity.
What to learn

A purpose-built Synapse Spark pool turns urgent notebook workloads into predictable operations by separating capacity, runtime, libraries, and ownership.

Scenario 02 Streaming service controls recommendation feature engineering cost Scenario, objectives, solution, measured impact, and takeaway.
Scenario

A video streaming platform used Synapse Spark to build recommendation features from viewing events. Engineers kept raising node sizes when feature jobs ran late after weekend releases.

Goals
  • Cut feature preparation time without simply doubling Spark capacity.
  • Expose pool settings and job metrics to the FinOps review board.
  • Keep experimental feature notebooks away from the certified feature pipeline.
  • Create a repeatable path for runtime and library upgrades.
Approach using Synapse Spark pool

The team inspected the Spark pool with Azure CLI and discovered a large fixed node count, long idle timeout, and several unpinned libraries. They created two pools: a production feature pool with autoscale, pinned packages, and longer timeout during release windows, and a small experimentation pool that auto-paused quickly. Engineers changed the feature notebook to reduce small-file scans and wrote pooled metrics to Azure Monitor. Release pipelines compared the production pool configuration against a JSON baseline before importing notebooks. Runtime upgrades were tested on the experimentation pool first, then promoted after a representative feature job completed within the target window.

Potential outcomes
  • Feature preparation time fell from 96 minutes to 51 minutes after tuning file layout and autoscale together.
  • Monthly Spark spend dropped 18% because idle exploration sessions no longer held large executors.
  • Release review time fell from one day to two hours with CLI inventory attached to pull requests.
  • No production recommendation job failed during the next two runtime patch cycles.
What to learn

Spark pool tuning is strongest when capacity changes are tied to workload evidence, library control, and separate pools for experimentation.

Scenario 03 Transit authority stabilizes fare reconciliation before payroll deadlines Scenario, objectives, solution, measured impact, and takeaway.
Scenario

A metropolitan transit authority reconciled fare taps, station outages, and refund adjustments in Synapse Spark. Month-end jobs regularly collided with payroll analytics and missed finance deadlines.

Goals
  • Complete fare reconciliation by 07:00 on the first business day of each month.
  • Prevent payroll notebooks from consuming reconciliation Spark capacity.
  • Document pool settings for auditors reviewing revenue adjustments.
  • Reduce operator time spent diagnosing failed Spark sessions.
Approach using Synapse Spark pool

The data platform group created a reconciliation Spark pool with a dedicated owner tag, medium node size, bounded autoscale, and a runtime already tested against the fare-clearing library. Payroll notebooks moved to a separate pool with lower priority and a shorter idle timeout. The Synapse pipeline checked storage partitions before starting the notebook and recorded the target pool name in run metadata. Azure CLI exported pool settings during each monthly close, and operators added quick checks for provisioning state, Spark version, and active sessions before reruns. The pool used managed identity to reach only the curated fare and adjustment folders.

Potential outcomes
  • Month-end reconciliation finished before 07:00 in the next six closes, up from two of the prior six.
  • Average diagnosis time for Spark failures fell from 74 minutes to 19 minutes.
  • Auditors accepted pool export evidence instead of requesting manual screenshots from Synapse Studio.
  • Payroll workloads no longer delayed finance runs during three peak holiday reporting periods.
What to learn

A named Spark pool with ownership, evidence, and isolation keeps critical analytics from being held hostage by unrelated notebooks.

Azure CLI

After ten years of Azure operations, I use Azure CLI for Spark pools because pool configuration must be auditable and repeatable. The portal is fine for exploration, but it hides drift when several workspaces have similar names. CLI output lets me list pools across resource groups, compare node sizes and autoscale settings, export evidence before a runtime upgrade, and script safe changes through deployment pipelines. During incidents, I can quickly confirm whether a notebook used the expected pool, whether the pool exists in production, and whether a recent update changed capacity, packages, or timeout behavior. That evidence prevents emergency tuning from becoming undocumented production configuration drift.

Useful for

  • List Spark pools across a workspace and export node size, autoscale, Spark version, timeout, and tags for capacity review.
  • Show one pool before a notebook incident to verify the runtime, provisioning state, and scaling settings actually used by operators.
  • Create or update a pool from deployment automation so development, test, and production use reviewed settings instead of portal drift.
  • Wait for pool provisioning before triggering dependent notebook tests in a release pipeline.
  • Delete an unused exploration pool only after validating ownership, recent sessions, dependencies, and cost evidence.

Before you run a command

  • Confirm tenant, subscription, resource group, workspace name, and region because Synapse workspace names are easy to confuse across environments.
  • Check whether the command is read-only or mutating; pool updates can disrupt active sessions or change job behavior even when data is untouched.
  • Verify your identity has Synapse and Azure RBAC rights to inspect or change workspace compute settings.
  • Review active notebooks, pipelines, and scheduled Spark jobs before resizing, updating packages, or deleting a pool.
  • Choose JSON output for automation and include explicit queries so scripts do not rely on friendly portal labels.

What the output tells you

  • The pool name, resource group, and workspace confirm you inspected the intended compute definition, not a similarly named development resource.
  • Spark version, node size, node count, and autoscale settings explain the capacity envelope available when notebooks or jobs start sessions.
  • Provisioning state and last update fields show whether Azure accepted the configuration or the pool is still changing.
  • Auto-pause and timeout values tell you whether idle sessions are likely causing cost waste or repeated cold-start delays.
  • Tags and resource identifiers connect the pool to owner, environment, cost center, and governance evidence.

Mapped commands

Spark pool lifecycle and inventory

direct
az synapse spark pool list --workspace-name <workspace-name> --resource-group <resource-group>
az synapse spark pooldiscoverAnalytics
az synapse spark pool show --workspace-name <workspace-name> --resource-group <resource-group> --name <spark-pool-name>
az synapse spark pooldiscoverAnalytics
az synapse spark pool create --workspace-name <workspace-name> --resource-group <resource-group> --name <spark-pool-name> --node-size <node-size> --spark-version <version>
az synapse spark poolprovisionAnalytics
az synapse spark pool update --workspace-name <workspace-name> --resource-group <resource-group> --name <spark-pool-name> --tags owner=<team>
az synapse spark poolconfigureAnalytics
az synapse spark pool wait --workspace-name <workspace-name> --resource-group <resource-group> --name <spark-pool-name> --created
az synapse spark pooloperateAnalytics
az synapse spark pool delete --workspace-name <workspace-name> --resource-group <resource-group> --name <spark-pool-name>
az synapse spark poolremoveAnalytics

Spark session checks

supporting
az synapse spark session list --workspace-name <workspace-name> --spark-pool-name <spark-pool-name>
az synapse spark sessiondiscoverAnalytics
az synapse spark session show --workspace-name <workspace-name> --spark-pool-name <spark-pool-name> --livy-id <session-id>
az synapse spark sessiondiscoverAnalytics

Architecture context

Architecturally, a Synapse Spark pool is the elastic compute tier for Spark workloads inside a Synapse workspace. It should be designed with a named workload purpose, not as a shared dumping ground for every notebook. Batch ETL pools usually need predictable autoscale ranges, package pinning, and clear timeout settings. Exploration pools may allow smaller nodes and shorter idle lifetimes. Sensitive pools need private networking, managed identity, approved libraries, and storage ACL alignment. The pool also belongs in the deployment model: Bicep or pipeline promotion should keep dev and prod comparable while allowing capacity differences. A seasoned architect asks which jobs depend on the pool, what data it can reach, how it is monitored, and what happens if its runtime is changed. This prevents one team's tuning choice from surprising every downstream consumer.

Security
Spark pool security is mostly about what code can run and what that code can reach. The pool itself does not grant lake access, but sessions started from it execute user code that may call storage, Key Vault, databases, packages, and external endpoints. Operators should control who can attach notebooks, submit jobs, install libraries, and change pool settings. Managed identity, storage RBAC, POSIX ACLs, private endpoints, and approved package repositories should be reviewed together. A permissive pool can become an exfiltration path if notebooks can read sensitive folders and send data outward. Security also includes supply chain discipline: pin libraries, avoid unreviewed wheels or jars, and document who approves runtime changes. Review workspace outbound rules when packages call external repositories during session startup.
Cost
A Spark pool definition has little cost while idle, but Spark sessions consume billable compute when they run. Cost is driven by node size, node count, autoscale behavior, session length, retries, and inefficient code that scans too much data. Auto-pause helps, but long-running notebooks, wide transformations, and abandoned interactive sessions still create waste. Tagging and naming should show which team owns the pool. Cost reviews should compare workload value with pool size, examine failed retries, and separate development pools from production pools so experiments do not hide inside a shared analytics bill. Forecasts should include seasonal growth and retry behavior, not only successful sample runs.
Reliability
Reliability depends on whether the pool can start sessions with the expected capacity, runtime, packages, and storage access when jobs need it. Autoscale helps absorb variable workloads, but it does not fix bad partitioning or exhausted regional capacity. Idle timeout saves money but can lengthen startup for time-sensitive pipelines. Library updates can make yesterday's notebook fail today. Operators should validate pool provisioning state, Spark version, node family, session failures, retry patterns, and upstream storage availability before blaming code. Reliable designs separate production pools from ad hoc exploration, keep change windows for runtime upgrades, and maintain rollback notes for package changes. The blast radius is smaller when each pool has a clear workload owner. Document rollback steps before forcing pool changes onto active workloads.
Performance
Spark pool performance is shaped by startup time, executor size, autoscale behavior, package loading, file layout, and the code submitted to the session. Bigger nodes help some workloads but can waste money when the bottleneck is tiny files, skewed partitions, slow storage reads, or a single-threaded operation. Autoscale can improve throughput for batch spikes, yet scaling decisions are not instant and should be tested against schedule deadlines. Operators should measure job duration, shuffle volume, executor utilization, failed tasks, and data read patterns before resizing. Performance tuning also includes warmup expectations, library initialization time, and selecting pools by workload class. The pool is the lever, but evidence decides which lever to pull. Confirm improvements with full-scale runs before declaring the pool tuned.
Operations
Operators manage Spark pools through inventory, standards, monitoring, and controlled change. A practical runbook lists every pool by workspace, owner, Spark version, node size, autoscale range, idle timeout, and package set. Before a change, operators check active sessions and scheduled jobs, then update in a maintenance window or clone a pool for testing. During incidents, they compare failed session logs, Spark application history, storage errors, and Azure Monitor metrics. Governance teams look for orphaned pools, expensive autoscale ranges, untagged workloads, and runtime versions nearing retirement. Good operations also means documenting which notebooks and pipelines depend on the pool so a resize or library update does not surprise downstream teams. Include runbook links so on-call staff know who can approve urgent changes.

Common mistakes

  • Treating the pool as a permanently running cluster and missing the session startup and idle timeout behavior.
  • Changing Spark runtime or packages in place without checking which production notebooks depend on the current behavior.
  • Using one oversized shared pool for experiments, production transformations, and sensitive data access.
  • Resizing compute before checking file layout, partition skew, storage throttling, or library initialization delays.
  • Deleting a quiet pool without confirming scheduled jobs, Git artifacts, and pipeline references.