How to Monitor Serverless Environment

Umbrella Infocare | 08 Sep 2019 | Newsletter, Managed Services

Serverless is changing the computing paradigm ushering in new connotations for faster and better. It
abstracts the application layer from the infrastructure by removing the host from the equation and reducing operational responsibilities.
Due to its many benefits serverless has become popular in recent times. According to a New Stack
survey in 2018, nearly 78% of respondents were using or planning to use serverless in the next 18
months.

Serverless is Different

Building serverless applications enables to shift operational responsibilities to the Cloud provider by leaving the plumbing including provisioning, scaling and managing servers to the service provider. It enables the developer to focus on developing code without worrying about infrastructure operations. Serverless increases productivity by bringing applications to life in a short span of time and ensures high performance with built-in scalability and reduced infrastructure cost with elasticity.

Serverless offerings such as AWS Lambda and DynamoDB do not require any infrastructure set-up, capacity planning, server management and network optimization as this is managed by AWS.

How Monitoring Serverless is Different

In the Cloud we monitor the performance of servers in terms of memory, capacity; network latency, etc. But in serverless these metrics are irrelevant as that layer is abstracted and things like scalability and load balancing is not an issue. Therefore monitoring serverless requires a different set of metrics. This includes

When combined, these metrics provide a comprehensive picture of operations to detect and prevent errors and performance degradation. Below we take AWS Lambda as an example to discuss how serverless can be monitored.

Monitoring AWS Lambda

The most important thing to monitor is the application code which calls for high level of observability while it is in production as workflows can be spread across several services and APIs with millions of concurrent operations.
Lambda enables to upload the code as a function and takes care of the execution by making available the compute capacity and scaling requirements. An error may occur due to the following conditions:

Tools for Monitoring AWS Lambda

AWS Lambda can be monitored using Amazon CloudWatch and AWS X-Ray services.

In addition third-party tools such as Datadog can be integrated with Lambda to get performance metrics on a single dashboard and perform additional functions such as custom metrics to get specific insights into operations relevant to the business workflow; verify permissions, etc.

While serverless applications have great promise there must be mechanisms that enable monitoring and observability to achieve the benefits on a consistent basis. It is crucial to remember that benefits of the new computing paradigm in serverless must be accompanied by new methods of monitoring.

Popular Blogs