Skip to the page
Tecyfy

Azure interview question · easy

Serverless vs. provisioned compute. What are the cost implications and performance trade-offs for different data workloads in Azure?

The short answerServerless compute charges for what each query or job uses and costs nothing when idle, which suits spiky and occasional work; provisioned compute charges for reserved capacity whether used or not, which is cheaper per unit and more predictable for steady, heavy work.

The full answer

Serverless compute charges for what each query or job uses and costs nothing when idle, which suits spiky and occasional work; provisioned compute charges for reserved capacity whether used or not, which is cheaper per unit and more predictable for steady, heavy work. The deciding numbers are how many hours a day the capacity is really busy and how much a slow start matters.

How the models differ

ServerlessProvisioned
BillingPer query, per second or per data processedPer hour of capacity, used or not
Idle costNone or very littleFull
ScalingAutomaticYou choose size, or set autoscale rules
Start-upPossible delay after idle (cold start, resume)Already running
PerformanceCan vary with shared capacityPredictable, can be tuned
Best forSpiky, occasional, exploratorySteady, heavy, latency-sensitive

Azure examples

  • Synapse serverless SQL pool charges for data processed by each query, with nothing reserved: ideal for exploring the lake. Dedicated SQL pools charge for data warehouse units while running, and can be paused.
  • Azure SQL Database serverless scales compute, bills per second and pauses when inactive (only storage is billed), but the first query after a pause waits for it to resume. Provisioned tiers are always on.
  • Azure Functions on the Flex Consumption plan scale to zero; the Premium and Dedicated plans keep warm instances to avoid cold starts.
  • Azure Databricks serverless compute starts in seconds for notebooks, jobs and pipelines and is billed only while working; classic clusters you size yourself can be cheaper for long, steady jobs, especially with spot VMs.

Cost trade-offs

  • Serverless avoids paying for idle time and for over-sizing, which is usually the biggest waste on provisioned systems.
  • At high, constant use, provisioned capacity (and reservations) is usually cheaper per unit of work.
  • Serverless costs are harder to predict: one badly written query over a large dataset can cost a lot. Set budgets, query limits and alerts.

Performance trade-offs

  • Serverless may add start-up latency and offers fewer tuning options.
  • Provisioned capacity gives consistent latency and full control over sizing, caching and workload isolation.

A practical rule Estimate the busy hours per day. If capacity would be busy most of the day, provisioned (with auto-pause or schedules where possible) usually wins. If it would be idle most of the time, serverless wins. Many platforms mix both: serverless for exploration and ad hoc work, provisioned for scheduled heavy loads and dashboards with strict response times.

Last updated 16 October 2026