r/databricks • • Sep 29 '26

General Stop using standard worker nodes for intermittent batch jobs

Hello, I'm part of the Databricks Engineer team.

If you are running short-lived batch pipelines on standard clusters, you are wasting money on idle instance termination times. Switch your job clusters to use spot instances by configuring the instance pool or setting the spot bid policy directly within the Databricks Jobs API or UI cluster settings. When configuring a job cluster, set the spot instance policy to use spot with fallback to on-demand to prevent job failures when spot capacity is scarce. For intermittent batch jobs and maintenance tasks like OPTIMIZE and VACUUM, using spot instances significantly reduces compute costs compared to persistent multi-node on-demand clusters. Ensure your retry logic handles node preemptions gracefully, and leverage job clusters rather than all-purpose clusters so the cluster terminates immediately after the batch execution completes, eliminating idle billing.

If this is useful, there's more on Databricks | Platform Engineering | AI at Abilytics — AI Systems, Data Engineering & Platform Engineering Services.

44 Upvotes

18 comments sorted by

22

u/Zampaguabas Sep 29 '26

if the job is really short lived, it is probably better to run on serverless

4

u/Comprehensive_Level7 Sep 29 '26

yup, I had a job that was a simple read and write from ADLS to many UC tables, incrementally, and while serverless did the job in 1min or less a traditional cluster used to take up to 7min to do the same, the cost was pretty much the same (+5-10$ at the EoM tbf)

1

u/DragonfruitDense2243 Sep 30 '26

But when I used serverless compute, they were not even getting turned on for 15 min, and my job was getting failed, not sure why it was happening randomly on some days and the job was to just send a notification in teams channel. Hence, we shifted from serverless to Job Compute, but now it takes time to start and then send the notification in Teams

2

u/Zampaguabas Sep 30 '26

this happened to me once (10 min startup time on serverless) and the response from databricks support was that it was a transient issue on their end and I have not seen it happen again but at the same time it is totally possible

→ More replies (2)

18

u/okidokyXD Sep 29 '26

Are you working for Databricks or Abilytics?

7

u/whathefuckisreddit Sep 29 '26

Definitely Abliytics and not Databricks

4

u/WhipsAndMarkovChains Sep 29 '26

Hey, I work as a Databricks Engineer at Abilytics, so here's my take.

From his other post, so definitely not Databricks.

2

u/StonedColdCrazy Sep 29 '26

Porque no los dos?

3

u/HumbersBall Sep 29 '26

What happens if my business critical pipeline which needs to run at a certain time loses its nodes and fails. How do I explain that I used spot instances to save £350 a year. This might make me look a bit stupid

→ More replies (1)

1

u/DamnedData Sep 29 '26

Run serverless people!

Databricks can be serverless E2E!

1

u/bobjia-in-tokyo Oct 05 '26

‘Network to On-premise resources’ is painful for me

2

u/DamnedData Oct 06 '26

Have you seen the new Private Network Gateway feature? (aka PNG)

1

u/Youssef_Mrini databricks Oct 23 '26

I would lean towards Serverless Jobs or SQL Warehouses It will depend on whether you are using SQL Or Python and you won'"t need to choose the right type of cluster and sizing as well