Skip to content

Idle Sleep

Idle sleep lets an environment scale its compute to zero when nobody is using it, and start again on the next visit. You pay for compute only while the environment is awake.

  1. You enable idle sleep on an environment and choose an idle period (10 minutes to 24 hours, default 30 minutes).
  2. When the environment receives no requests for that period, the platform stops its containers.
  3. The next visitor sees a Quant Cloud loading page while the containers start. This usually takes one to three minutes, depending on your image size and start-up scripts.
  4. The page reloads automatically once the environment is ready.

Only container compute sleeps. Databases, file storage, caches and load balancer rules keep running and keep billing.

Simple bots and scanners do not wake a sleeping environment. Browsers do. Verified search engine crawlers (Googlebot, Bingbot and others) can wake it at most once per hour; between wakes they receive a temporary 503 with a Retry-After header.

Once awake, every request keeps the environment awake, including crawler and bot traffic. A public production site rarely idles unless the traffic that does not need the origin is served elsewhere. Before enabling idle sleep on production:

  • Enable static offload so cached pages are served from the edge.
  • Add a rule that serves static content to crawlers.
  • Accept that the first visitor after a quiet period sees the loading page.

Editorial environments for static sites are the best fit: the public site is served from the edge and the origin only needs to be awake while editors work.

Starting, redeploying, or updating the compose configuration of a sleeping environment wakes it first. Cron runs, exec commands, backups and restores run as separate tasks and do not wake the environment.

In the dashboard, open the environment and use the Idle sleep control. Through the API, PUT /environments/{environment}/idle-sleep with {"enabled": true, "idleMinutes": 30}.