Graph showing the increase in Lambda serverless function invocations in the past 2 years

Serverless isn’t just a fad; it’s here to stay. According to Datadog’s State of Serverless 2021 report, AWS Lambda functions were invoked 3.5 times more often than they were in 2019. The company explained this is an indication that teams are making serverless a critical part of their software stacks, not just experimenting with it. 

AWS Lambda invocations are also much faster than they were even just a year ago. In 2020 the median Lambda invocation took 60 milliseconds, which Datadog says is half the time it took in the previous year. One possible reason for this is that more organizations are following Lambda best practices and designing functions that are specific to their workloads. 

RELATED CONTENT: Evaluating if serverless is right for you

According to the report, the tail of latency distribution is long. This is an indication that Lambda isn’t just powering short-lived jobs, but powering more computationally intense use cases.

Adoption of Azure Functions and Google Cloud Functions are also gaining momentum. Over the last year, the share of Azure companies running Azure Functions increased from 20% to 36%. Nearly a quarter of companies using Google Cloud are using Google Cloud Functions. 

“What we saw in this report, and then last year’s, is that serverless is really here to stay and that it’s growing super fast,” said Stephen Pinkerton, product manager at Datadog. “What we see is serverless is kind of in every type of organization and people are using it to solve a variety of problems.”

AWS Step Functions is also becoming important for those practicing serverless. AWS Step Functions allows developers to build workflows that involve multiple Lambda functions and AWS services. It can coordinate error handling, retries, timeout, and other application logic, helping to reduce operational complexity as applications scale. According to the report, the average Step Functions workflow contains four Lambda functions. This number continues to grow month over month, according to Datadog. 

There are two types of workflows that can be executed by Step Functions: Standard and Express. Datadog believes that since over 40% of workflows are being executed in under a minute, it’s likely that organizations are using Express workflows to support high-volume event processing workloads.

In addition, while many Step Functions workflows execute quickly, others run for a long time. The longest workflows run for over a week, according to the report.  

Developers are turning to Lambda for edge computing as well. According to the report, a quarter of organizations that use Amazon CloudFront use Lambda@Edge, which can be used for tasks like transforming images based on user characteristics or serving different versions of an application for A/B testing. 

The report found 67% of Lambda@Edge functions run in under 20 milliseconds, possibly indicating that serverless edge computing has the potential to support even the most latency-critical applications. “As this technology matures, we expect to see more organizations relying on it to improve their end-user experience,” the report stated. 

Datadog also found that organizations are overspending on Provisional Concurrency, which is an AWS feature designed to reduce the delay in execution of functions, otherwise called a “cold start.” Over half of functions use less than 80% of their Provisional Concurrency, while 40% use their entire allocation, leaving them open to the possibility of still encountering cold starts. 

“We see overallocation… and so I think this is just a sign that people are getting very sophisticated with serverless and with running applications here, but there’s still a lot of learning that we all have to do on how to best use the tools,” said Pinkerton. 

Python is the most popular Lambda runtime in large environments, by far. Fifty-eight percent of deployed Lambda functions use Python, which is an increase of 11% since last year. Another 31% run Node.js, which is down 8% from last year. However, when looking at small AWS environments only, Node.js is used more often than Python. The remaining runtimes, Java, Go, .NET Core, and Ruby, are used in less than 10% of Lambda runtimes in large organizations.   

The Serverless Framework seems to be the top serverless deployment tool, among options like AWS Cloud Development Kit (CDK) and AWS Serverless Application Model (SAM). Ninety percent of CloudFormation members use the Serverless Framework, 19% use vanilla CloudFormation, 18% use AWS CDK, and 13% use AWS SAM, according to the report.