nitrictech/nitric

Poor cold start performance on AWS Lambda

jyecusch opened this issue · 1 comments

The first cold start for a new function in AWS Lambda takes significantly longer than subsequent requests or even subsequent cold starts.

Here is an example of the behavior from a recent test:

Result Description
9.56s First request in this region (no previous deployments of this container or its layers)
2.67s Edit an Env Var on the container (forced cold start)
~100ms All subsequent requests (hot instances)

Ideally, we can also improve the cold start time for subsequent cold starts as well.

This hasn't been reported issue in real use schenarios, closing unless it's raised again.