4 ms·
I feel as if the whole "warm up the lamba as a pre-step"-thing takes away from the whole benefit of serverless. I wonder if AWS Lambda could be smart enough to
by isuckatcoding 8y ago
I feel as if the whole "warm up the lamba as a pre-step"-thing takes away from the whole benefit of serverless. I wonder if AWS Lambda could be smart enough to anticipate requests based on some historical or daily pattern. Also, I'd be curious to know if it is still cost effective to use lambda with this technique (pre-warming) or to straight up go for a EC2 instance.
- stephenr 8y agoOr.. you know.. don't have user-facing interfaces serviced by endpoints that aren't running all the time? I can see that maybe there is a case to make for using functions as a service, to handle batch processing of things, or possibly to service background API requests.
- TrueTeller 8y ago1. Most applications don't need the warm-up since they aren't too critical to cold starts. 2. Cloud vendors are working and succeeding to make cold starts faster, and AWS is at the forefront. 3. Pre-warming done right is extremely cheap, you won't pay anything meaningful, just several cents per month. P.S. I'm the author of OP.
- jacques_chester 8y ago> I wonder if AWS Lambda could be smart enough to anticipate requests based on some historical or daily pattern. This is called "predictive autoscaling". In other fields it's called seasonality and you can build inventory and manufacturing plans around it. While researching FaaSes last year I saw a slide deck from an Amazon PM about Lambda (I promptly lost the link). The thing that stuck with me was a claim that a substantial amount of their autoscaling "magic" was due to predictive autoscaling. Netflix wrote up[1][2], but have not opensourced, their predictive autoscaler "Scryer" in a few blog posts. The tl;dr is that they use a combination of fourier transforms and simple correlations to make a basic forecast of how many VMs to have ready at different times of day. A reactive autoscaler adjusts on the day. [1] https://medium.com/netflix-techblog/scryer-netflixs-predictive-auto-scaling-engine-a3f8fc922270 https://medium.com/netflix-techblog/scryer-netflixs-predicti... [2] https://medium.com/netflix-techblog/scryer-netflixs-predictive-auto-scaling-engine-part-2-bb9c4f9b9385 https://medium.com/netflix-techblog/scryer-netflixs-predicti...