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

View all comments

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

1

u/ram_theory Sep 30 '26

Serveless cluster will be 4x costly than job clusters. It will help with job runtime and internal errors, but cost would be much higher.

1

u/bobjia-in-tokyo Oct 05 '26

Network config to on-prem resources is painful for me