Always on
Keep an app running at all times, for live connections and long streams.
- Plans
- Starter and up
- Always-on apps
- Free app: No · Starter: As many as you like · Team: As many as you like · Business: As many as you like
What you get
- An app that never sleeps
- No start-up wait for the first visitor
- Set in whisk.yaml and kept with the code
- Deploys, logs and rollback as for any app
How it works
An app with always_on: true in its whisk.yaml keeps its container running. Whisk's idle check skips it, so no request ever waits for the app to start. The setting takes effect when the deploy that contains it goes live.
Turn this on when people shouldn't have to wait for the app to start. You don't need it for live updates: an app stays awake while someone has a WebSocket or event stream open.
Other apps should sleep when idle, because a sleeping app uses no memory. The plan sets how many apps can be always on, and a plan without it refuses the setting with PLAN_FEATURE.
Example
A distributor of commercial cleaning supplies shows a dispatch board on a screen in its warehouse. The board has to show up the moment someone opens it, so the app is always on. The distributor's other apps sleep when nobody is using them.
For your coding agent
always_on: true
Remove the line and deploy again to let the app sleep. Every field is in the whisk.yaml reference, and the usage page shows what each plan includes.