{"version":"2026-10-02","topic":"scale-to-zero","covers":"Letting an idle server app sleep, and the cold start when it wakes","available":true,"who":["agent"],"summary":"A server app that gets no traffic for 360 minutes can be put to sleep. The first request wakes it, which takes about 4-9 seconds. By default apps stay on.","how":["Send the header X-Scale-To-Zero: true on POST /apps to opt in, or \"false\" to opt out."],"requirements":["writes any persistent state under DATA_DIR (see persistence above)","tolerates the process restarting between requests — in-memory state is lost"],"limits":["WebSockets are not supported at all (see not_supported above), with or without scale-to-zero.","Automated traffic (credential scanners, crawlers) will NOT wake a sleeping app; it gets a 404.","A stopped app is woken by the first real request, which is held until the app answers.","Not used for static sites."],"next":"Only opt in if a few seconds' delay on the first request is fine for this app.","links":{"docs":"https://embarko.ai/docs/capabilities","feedback":"https://ship.embarko.ai/api/public/customer-query"}}