Serverless Computing

What is Cold Start?

Updated on: October 30, 2026

Author: Ioana Grigorescu, Content Manager

Reviewed by: Meir Amzallag, CEO & Co-Founder

Learn how cold starts impact serverless application performance. Understand when they occur, the problems they cause, and effective techniques to reduce cold start times in Lambda.

What is a cold start in serverless computing?

In serverless computing, a “cold start” is the time it takes for a function to begin processing after it has not been called in a long time. With AI inference, loading a model can take minutes or much longer—like that one NetEase Games workload where it took a whopping 42 minutes. When a computer is turned on after being shut down, it may need time to reach its full performance.

Cold starts are well known to anyone who is starting with serverless architectures. They affect your application’s performance and usability, especially with interactions where timeouts must be the shortest time possible.

When does cold start to happen?

Cold starts occur under the following circumstances.

  • First Invocation: This occurs when a function is called for the initial time after the deployment of the applications or after the update of code.
  • Scaling from Zero: When a function expands from having no occurrences and receives calls after a while of non-operation.
  • Resource Reallocation: When the cloud provider reallocates resources or the function’s base changes to other hosts, it may lead to cold function instances.
  • Timeout or Expiration: If a function instance is at max execution time or has exceeded its idle time, it can be terminated, meaning that if it is invoked again, it will start fresh.

A warm start has the opposite affect: the request reaches an instance that is still running, so the setup is skipped.

What is the problem with cold start in serverless?

A primary challenge associated with cold starts is the additional latency. This latency can be observed in the form of:

  • Delayed Responses: While your app generally provides prompt replies, users may occasionally encounter delays that could affect their experience.
  • Reduced Throughput: Cold starts might necessitate a gradual increase in your application’s ability to handle concurrent requests, especially during periods of heavy usage.
  • Performance Variances: Cold start numbers vary between invocations, so serverless response times can’t be predicted without serverless monitoring.

How long does Lambda cold start take?

The duration of a Lambda cold start can vary depending on different factors, such as:

  • Function Size and Dependencies: The larger the function is, the more dependencies are involved and the longer the typical cold start takes.
  • Runtime Environment: The initial runtime environment selected (for example, Node.js, Python, Java, etc.) necessarily determines a factor such as cold start time because of the differences in the initialization and loading processes.
  • Cloud Provider Optimizations: Over time, cloud providers consistently provide optimizations to reduce cold start time as much as possible; however, it isn’t fixed or predictable.

Overall, Lambda’s cold starts can vary between under 100 ms and over 1 second. Check your own functions to observe how cold start durations reflect the needs of your functions and environment to gain accurate insights.

 

 
Factor Impact on Cold Start Considerations
Function Configuration
Function Size Larger functions result in longer cold starts Minimize package size and remove unused dependencies
Dependencies More dependencies increase initialization time Use tree-shaking and code-splitting to optimize loading
Runtime Environment
Runtime Selection Different runtimes have varying initialization times Choose runtime based on application needs and cold start performance
Memory Allocation Higher memory allocation can reduce cold start time Balance between cost and performance requirements
Execution Context
First Invocation Longest cold start duration Consider warm-up requests for critical functions
Subsequent Calls No cold start if within execution window Use provisioned concurrency for consistent performance

How do I reduce the cold start time in Lambda?

Minimize Lambda’s cold start time by:

  • Function Optimization:
  • Delete unused code and dependencies to reduce the function size.
  • Tree-shaking or code-splitting methods should be used to reduce the amount of loaded code during initialization.
  • Improve package distribution and package dependency resolved workflows.
  • Snapshot Restore: Lambda SnapStart, for runtimes such as Java, gives a saved snapshot of an initialized function instead of starting it again to reduce latency.
  • Provisioned Concurrency:

Configure provisioned concurrency to maintain the specific number of function instances active so that the incoming requests do not cause a cold start for those instances.

  • Warm-up Requests:

Sometimes, you need to send some dummy requests to your functions so that they are warmed up when the real user requests arrive.

  • Asynchronous Processing:

For non-critical operations, it may be better to refactor user requests from functions by introducing other asynchronous patterns so that cold starts have minimal effect.

  • Caching:

Introduce appropriate caching mechanisms that store frequently accessed data or pre-computed results to reduce the number of function invocations and thus decrease the occurrences of cold starts. Prefetching the function load at start-up works the same way: NetEase Games decreased one AI model’s load time from 42 to 14 minutes with a cache,and then down to 3 with prefetching (CNCF, 2026).

Conclusion

Cold starts in serverless architectures can be considered an inherent disadvantage of the model, but it is still possible to assess their overview, effects, and ways to minimize them in detail for your program and user-perceived quality. There are several important points one has to recall: proactive optimization, permanent monitoring, and necessary changes according to the particular needs of applications.

Ready to get started?

We've been where you are. Let's share our 20+ years of experience and make your global dreams a reality.
Mosaic image
en_USEnglish