O'Reilly logo

DevOps for Serverless Applications by Shashikant Bangera

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required