Warm-up

A cold start is one of the major issues with respect to serverless function. The warmer the functions are, the better performance we get. But how do we keep our functions warm all the time? The serverless framework provide a plugin to help us do that. The plugin's name is Serverless WarmUP Plugin. So, how does this plugin work? 

The plugin creates a scheduled event Lambda that invokes all the service Lambdas we select in the time interval. So this plugin will keep the function warm by forcing the underlying container's to stay alive. To set up this plugin, we need to first install it:

$ npm install serverless-plugin-warmup --save-dev

Then in serverless.yml, we can configure it by calling it under the plugins section. We need to mention ...

Get DevOps for Serverless Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.