r/databricks • u/Cool_Inspector7468 • 17h ago
General When does it make sense to use serverless for Jobs and Lakeflow pipelines?
Hii beautiful people, I am working in a new project situation and we have mainly source systems that do not need Streaming (Full Snapshots) that trigger our Databricks Jobs through Logic Apps.
I got a question from my manager wether to run our Jobs and Lakeflow pipelines on serverless or class job clusters?
What drives the decision? and how do you measure the comparison fairly?
Team of 5. + Frontend(PowerBI) but we are considering testing metric views/AI/BI Dashboards in the near future.
Thanks in advance
10
Upvotes
12
u/Emperorofweirdos 13h ago •
Gonna add something here since the only other two people who've responded work at Databricks.
They mention versionless serverless, which might be a good thing for most workloads. However, having a few of their versionless products running in prod, I can tell you it's unfortunately not all sunshine and rainbows.
What versionless means in practice is that when the underlying runtime gets upgraded, your job or pipeline can pick up that change on its next scheduled run without you having explicitly opted into the upgrade.
This means things can (and in our experience, have) broken in prod because a previously supported feature is no longer supported, behavior has changed, or new compatibility issues have been introduced that didn't exist in the previous runtime. Not a fun time being woken up at 3am for these changes.
Versionless is great from a maintenance perspective, but it comes at the expense of control over runtime upgrades and the ability to validate those changes before they hit production. It's a trade-off worth considering.
7
u/inkypinky Databricks 14h ago
hey u/Cool_Inspector7468 I'm a product manager at Databricks. I recommend starting new workloads on serverless by default. There's no infrastructure to manage, it's super stable, it scales up and down automatically, plus the Databricks Runtime (DBR) gets upgraded automatically.
There are some cases where you should use Classic e.g. Serverless does not support all Spark configs or older Spark APIs like RDDs. But we keep adding new ones - e.g. it now supports
df.cache(), whereas previously it would error out. Another reason to use Classic is if Databricks can't reach a resource e.g. database in your private VPC (we are previewing a solution to this, but it's not available everywhere yet).Actually many people don't know this, there are two "modes" for serverless compute. Performance Optimized starts compute in seconds and scales up fast (more aggressive autoscaler). Standard Mode starts in ~4-6 minutes, and scales up slower. It's cheaper than Performance Optimized.
For Spark Declarative Pipelines, I 100% recommend serverless -- partially because Enzyme (automatic incremental ETL) is only available in serverless SDP.
NOTE: I am not claiming Serverless is ALWAYS cheaper. But we are continuously improving its price-performance. So over time, you are very likely to do well with it, especially if you take into account the cost of maintaining clusters.
1
u/PersonalPanda1535 5h ago
On Azure invoice was about double what we expected. A few jobs were still running on two old all-purpose clusters that sat idle between triggers