Reputation: 2449
I am looking into AWS Lambda Functions, as a backend for a web API. Having 3 to 15 secs of cold start time is, therefore, a concern to me.
But if this is just the first initial render for the page that would be workable.
Let's say I have 5 different lambda functions, all 5 functions are in the same JAR package. Would I have a cold start for each function, or would it be a single code start for the JAR package as a whole?
Upvotes: 1
Views: 148
Reputation: 516
The cold start is for each lambda, as its loading your code into the container(lambda is pretty much running in a container) and each lambda runs in a separate container.
The cold start time depends on your programming language and it can be optimized. The first time you run your code it will take the longest, the second time it will take significantly lower and then the third time you wont have any cold start. Lambdas are "hot" for around 8 to 12 minutes, so if you dont invoke it for that long it will go into a cold boot again
Upvotes: 1