4 ms·
> If you haven't looked into Lambda cold start problems, you're in for a treat. What the heck are you doing for 15 second cold starts? I haven't seen more than
by throwaway2016a 9y ago
> If you haven't looked into Lambda cold start problems, you're in for a treat.
What the heck are you doing for 15 second cold starts? I haven't seen more than a 1s overhead for cold starts with Node.js apps packed with webpack (more like 2 or 3s without webpack)
But yes, if the cold start time is unacceptable to you. Lambda is a terrible fit. But you have to ask yourself what is and is not acceptable. Especially in a mobile or single page app where you can eager load or do background requests.
It is not for everyone.
Another trick is to group similar functions together in the same code and have different API gateway endpoints go to the same Lambda. Using that method most apps I've made have less than 1% of requests hit a cold start situation.
Edit: for many apps 1% sold starts is unacceptable. And that's OK. Lambda isn't for you.
- joecot 9y agoIf you're cold starting in the public cloud, Lambda can start in 1s. If you're cold starting Lambda functions with a VPC NIC (which you would need to do if you're trying to connect to a MySQL server), it can take 10-15+ seconds. The issue is provisioning the network interface, not any manner of packing the code.
- throwaway2016a 9y agoThank you for clarifying. I up voted you. I have not experience that since I run most of my Lambdas in the public cloud so I have not experienced that. That is good to know and sounds like something they really need to address.