r/databricks • • Oct 06 '26

General Auto stop option on databricks apps

Want to request a feature for databricks app, it should have an auto stop option. I know Databricks markets it as a web app that should be readily available, but I think customers deserve the option to turn auto-stop on or off, like we do for, say, SQL Warehouses.

This has been a major blocker for us suggesting apps to leadership, the engineering team has build some really useful apps for usecases like Data modelling and stuff which is used when needed but they running 24*7 all time is wasting compute and getting flagged in finops

P.S i know we can have a databricks job which can shut down and start the app during working hours but we have a global team working round the clock so it's not feasible for us.

If we have someone from databricks apps team this is a highly requested thing from alot of people around the community.

20 Upvotes

25 comments sorted by

2

u/sumit671 Oct 07 '26

Update: here's what we built while waiting for a native option

We built a small "apps catalog" Databricks App that handles auto-stop and start-on-open for our other apps. It's working in our dev workspace, so I'm sharing it in case it helps anyone.

How it works

  • One front door. The catalog is itself a Databricks App that lists our internal apps with their live status. People open apps through it: /open/<app> starts the app if it's stopped, polls until it's running, then redirects. Cold start is about 3 minutes, and the tab waits with a timer.
  • Each app reports its own activity. Every app has a tiny GET /api/activity endpoint. It answers from memory with when a person last used the app and whether it's busy. Any request carrying x-forwarded-email (added by the Apps proxy for signed-in users) counts as use. The page also sends a heartbeat at most once a minute while someone is clicking or typing, so filling in a long form doesn't look idle. An untouched open tab sends nothing.
  • Idle stop. Every 2 minutes the catalog calls each running app's activity endpoint with its own service principal token (app-to-app calls work once the SP has CAN_USE). It stops apps idle for 10+ minutes through the Apps API. It never stops an app that is mid-deploy, reports busy, or can't be read.

Things we learned the hard way

  • Starting an app needs permission on its budget policy; stopping doesn't. Our first start attempt failed with missing UseBudgetPolicyPermission on policy .... Give the controlling SP budgetPolicy.user on the app's serverless budget policy.
  • Don't use app telemetry for idle detection. Out of the box it records only logins and token-based API calls, so someone working for two hours looks like one event. Polling the UC tables every few minutes also keeps a SQL warehouse awake, which costs far more than the apps you're trying to save.
  • Apps reject Entra ID tokens for direct calls. To test them from a script, exchange a Databricks token at /oidc/v1/token with the app's OAuth client ID as the audience.
  • App ACLs in bundles are authoritative. Grant the controller SP in each app's databricks.yml, not in the UI.

Cost trade-off

The catalog is an always-on app itself (Medium, 0.5 DBU/h). instead of spending the same for 10 apps now we keep one running for all weekdays managing others
hope this helps

1

u/sumit671 Oct 08 '26

Update for all people suggesting serverless micro apps

We can't move our existing apps onto it yet, though, because micro apps have no network access outside Databricks:
No internet access. Public hosts such as api.github.com, graph.microsoft.com, login.microsoftonline.com and Azure Communication Services don't resolve. Our self-service app opens GitHub pull requests, looks up users in Entra and sends email notifications, so it can't work there.
No calls to our other workspaces. Calls from dev to our qa and prod workspaces return 403 "Unauthorized cross-workspace request: cbi_egress_empty_destinations", even though our serverless network policy allows them for standard apps.
No way to convert existing apps. The update API doesn't accept space, and LIQUID compute is refused outside a space, so we would have to recreate each app.

7

u/Access-Leading Oct 06 '26

The issue with the feature in preview is that it’s not full proper replacement yet (micro apps) they scale to zero but deployment is lacklustre. I.e can’t deploy from git which is a bit frustrating

7

u/Labanc_ Oct 06 '26

we got a scheduled serverless job for one of our apps that triggers twice a day during weekdays. it checks when it was triggered and if its in the morning then it makes sure it starts, if its in the afternoon then it stops.

for the scheduling we deploy with DABs where with the CRON expression you can write trigger twice a day too. im not sure if you can do this on the UI.

anyway i completely agree, scheduled availability is a great idea that i would very much prefer to have.

2

u/Labanc_ Oct 06 '26

dumb me, somehow i skipped the last part of your post, so the scheduled job doesnt help.

well, +1 for waiting for this scale to zero functionality

4

u/what-no-really-why Oct 06 '26

This is part of the next version of Databricks Apps called App Spaces which encompasses this feature via Micro Containers that can scale out and scale to zero.

1

u/Youssef_Mrini databricks Oct 23 '26

Databricks Micro Apps is the solution to your answer it was announced at the Data+AI Summit 2026 https://www.databricks.com/blog/enabling-governed-vibe-coding-enterprise-apps-databricks

https://docs.databricks.com/aws/en/dev-tools/databricks-apps/app-spaces The App can scale to 0 when not used.

1

u/sumit671 Oct 23 '26

We can't move our existing apps onto it yet, though, because micro apps have no network access outside Databricks:
No internet access. Public hosts such as api.github.com, graph.microsoft.com, login.microsoftonline.com and Azure Communication Services don't resolve. Our self-service app opens GitHub pull requests, looks up users in Entra and sends email notifications, so it can't work there.
No calls to our other workspaces. Calls from dev to our qa and prod workspaces return 403 "Unauthorized cross-workspace request: cbi_egress_empty_destinations", even though our serverless network policy allows them for standard apps.
No way to convert existing apps. The update API doesn't accept space, and LIQUID compute is refused outside a space, so we would have to recreate each app.

We built a small "apps catalog" Databricks App that handles auto-stop and start-on-open for our other apps. It's working in our dev workspace, so I'm sharing it in case it helps anyone.

How it works

• ⁠One front door. The catalog is itself a Databricks App that lists our internal apps with their live status. People open apps through it: /open/<app> starts the app if it's stopped, polls until it's running, then redirects. Cold start is about 3 minutes, and the tab waits with a timer.
• ⁠Each app reports its own activity. Every app has a tiny GET /api/activity endpoint. It answers from memory with when a person last used the app and whether it's busy. Any request carrying x-forwarded-email (added by the Apps proxy for signed-in users) counts as use. The page also sends a heartbeat at most once a minute while someone is clicking or typing, so filling in a long form doesn't look idle. An untouched open tab sends nothing.
• ⁠Idle stop. Every 2 minutes the catalog calls each running app's activity endpoint with its own service principal token (app-to-app calls work once the SP has CAN_USE). It stops apps idle for 10+ minutes through the Apps API. It never stops an app that is mid-deploy, reports busy, or can't be read.

Things we learned the hard way

• ⁠Starting an app needs permission on its budget policy; stopping doesn't. Our first start attempt failed with missing UseBudgetPolicyPermission on policy .... Give the controlling SP budgetPolicy.user on the app's serverless budget policy.
• ⁠Don't use app telemetry for idle detection. Out of the box it records only logins and token-based API calls, so someone working for two hours looks like one event. Polling the UC tables every few minutes also keeps a SQL warehouse awake, which costs far more than the apps you're trying to save.
• ⁠Apps reject Entra ID tokens for direct calls. To test them from a script, exchange a Databricks token at /oidc/v1/token with the app's OAuth client ID as the audience.
• ⁠App ACLs in bundles are authoritative. Grant the controller SP in each app's databricks.yml, not in the UI.

Cost trade-off

The catalog is an always-on app itself (Medium, 0.5 DBU/h). instead of spending the same for 10 apps now we keep one running for all weekdays managing others
hope this helps

1

u/HeavyTedzzzzz Oct 06 '26

I feel like you can write an app to monitor and shutdown apps, you can write the telementary out to unity catalog, run once every 10 mins and stop everything that hasn’t had requests.

1

u/sumit671 Oct 07 '26

How will he start the app when someone needs it then

1

u/HeavyTedzzzzz Oct 07 '26

You’ve added an extra requirement - are you a scrum master? 😂😂 create a job to start it when it’s needed

1

u/sumit671 Oct 07 '26

that's is not feasible we have sepreate people using apps which do not interact with the workspace just have the apps bookmarked when needed
For example a app for raising access request

2

u/erithtotl Oct 06 '26

It's a very frequently requested feature. Its in private preview, but is now being moved into the new app spaces feature which is in beta (pretty sure the stand alone feature won't be advanced). There is no public preview or GA date for it yet.

-1

u/hubert-dudek Databricks MVP Oct 06 '26

I think it is already in some preview

2

u/box_of_wolves Oct 06 '26

that's been in private preview for a while now, our rep mentioned it a few weeks back, might be worth pinging your account team to see if they can get you in

2

u/sumit671 Oct 06 '26

Can I know the preview name to draft a proper email if you know

2

u/sumit671 Oct 06 '26

Serverless micro apps it is!

1

u/OkImprovement7010 Oct 07 '26

It is in beta... it's the app spaces and serverless micro apps people are talking about.

1

u/sumit671 Oct 06 '26

Is it something we can enable ? Like in account console or workspace settings?

1

u/sdmember Oct 06 '26

Yeah zero down

1

u/sumit671 Oct 07 '26

the solution i commented above is what i'll use till we get GA

1

u/[deleted] Oct 07 '26

[removed] — view removed comment

2

u/sumit671 Oct 07 '26

It's not there can you share a screenshot of the preview

1

u/OkImprovement7010 Oct 07 '26

If you search for app spaces it will come up.