Minimize libraries

When we write a function, we might need libraries to make it run. But adding a huge set of libraries to the function would make it really slow. There are two types of starts when using functions—one is the cold start, which is function that is started for the first time, and the other is the warm start, which is function that has already been started and is ready to be executed from the pool. So in theory, a larger number of libraries will be slower during the cold start and will also impact the scaling of the application. With each increase in scale, the function has to perform a cold start, and so, as the cold start is slower, the scaling is slower. 

Also, as the number of libraries rises, the less secure our code will ...

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.