Always on

Keep an app running at all times, for live connections and long streams.

Built on Caddy

Plans: Starter and up

Always-on appsFree appStarterTeamBusinessClient business
IncludedNoAs many as you likeAs many as you likeAs many as you likeAs many as you like

What you get

  • An app that never sleeps
  • Live updates over WebSockets or server-sent events
  • 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.

Use it for apps that hold connections open, such as a live board updated over WebSockets, or that must answer at once. Requests pass through Caddy, the open-source web server in front of every app, which passes WebSockets and long streams through unchanged.

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. New orders reach the board over a WebSocket as they come in, so the app stays on all day. 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.

All features