Book Image

DevOps for Serverless Applications

By : Shashikant Bangera
Book Image

DevOps for Serverless Applications

By: Shashikant Bangera

Overview of this book

Serverless applications are becoming very popular among developers and are generating a buzz in the tech market. Many organizations struggle with the effective implementation of DevOps with serverless applications. DevOps for Serverless Applications takes you through different DevOps-related scenarios to give you a solid foundation in serverless deployment. You will start by understanding the concepts of serverless architecture and development, and why they are important. Then, you will get to grips with the DevOps ideology and gain an understanding of how it fits into the Serverless Framework. You'll cover deployment framework building and deployment with CI and CD pipelines for serverless applications. You will also explore log management and issue reporting in the serverless environment. In the concluding chapters, you will learn important security tips and best practices for secure pipeline management. By the end of this book, you will be in a position to effectively build a complete CI and CD delivery pipeline with log management for serverless applications.
Table of Contents (17 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
5
Integrating DevOps with IBM OpenWhisk
Index

Best practices for Serverless


As we know, the serverless architecture consists of a small piece of code called a function, which runs in a stateless container. One major purpose of this architecture is to scale and descale as and when required. So, bearing this in mind, our best practices are more or less focused on this aspect of serverless. So let's look at a few of the best practices involved with the serverless concept.

One function, one task

When we start building functions, we might end up with monolithic functions behind the proxy route and use a switch statement. So, if we have one or a few functions to run our whole app, then we are actually scaling the whole application instead of scaling a specific element of the application. This should be avoided, as scaling would be a problem in this instance, and we also might end up with large and complex functions. 

Functions call other functions

We should avoid calling a function within another function because we will end up paying more for...