Avoid Cold Starts With Scale-to-Zero Light Sleep
Today, we're thrilled to announce the public preview of Light Sleep. Waking up from Scale-to-Zero is now imperceptible for CPU workloads with sub-200ms cold starts.
A few months ago, we announced the first iteration of Scale-to-Zero on the platform to reduce idling costs. With Scale-to-Zero and Autoscaling, apps sleep and wake up automatically on demand based on requests, and scale out horizontally according to your criteria.
Light Sleep allows you to enable Scale-to-Zero with no noticeable latency impact for end-users, enabling users operating large container fleets to dramatically improve efficiency with zero performance compromise.
The following demo shows just how much faster an Instance wakes up from Light Sleep compared to Deep Sleep:
Customers like app.build create tens of thousands of containers daily to support agentic workloads: Light Sleep is essential to enable large-scale deployments of AI agents.
Scale-to-Zero: Deep and Light Sleep
The initial version of Scale-to-Zero introduced a mechanism we call Deep Sleep to enable new use cases and improve compute efficiency, especially for infrequently accessed workloads. Deep Sleep cold starts - the delay between receiving a new request and the app being ready to respond - can take between 1 and 5 seconds. Waking up from Deep Sleep takes time, as the name suggests. This is noticeable to users and is not suited for real-time workloads.
Light Sleep is a major milestone in our ongoing journey of making serverless a reality and optimizing efficiency. The Light Sleep option of Scale-to-Zero reduces cold starts to around 200ms for CPU workloads, allowing you to quickly bring your services back to life after idle time.
Getting Started with Light Sleep
Light Sleep is available today in public preview on the Starter, Pro, and Scale plans. On the Pro and Scale plan, you can customize the idle period before a light sleeping Instance transitions to Deep Sleep. Check the full documentation to know more.
During the public preview, Instances light sleeping are free. When we hit GA, we will charge 15% of the normal per-second Instance price for a light sleeping Instance.
You can enable Light Sleep on your Service in a few quick steps:
- Navigate to the Koyeb console and select your Service running on CPU from the Services tab.
- Click Settings > Scaling, and ensure the minimum number of Instances is set to 0.
- Set your Idle Period, which is how long the Service stays active without receiving traffic.
- Select Light Sleep to enable the feature, and then set the time period that the Instance will remain in Light Sleep before transitioning to Deep Sleep.
- Click Save and deploy. You can select Without rebuild if you're not including any changes that affect your build process.
Now your Service is ready to scale up and down quickly as needed, allowing the most efficient use of your resources on Koyeb!
Try it today
You can get started today with Light Sleep and leverage the benefits of serverless: save resources when they're not in use, and get up and running quickly when they are needed.
Stay tuned for more details on the internals!
Have questions, feedback, or just want to show off what you’re building? Join us in the Koyeb Community — we’d love to hear from you.