What's happening with serverless cloud?
Serverless is gaining traction and use cases are expanding. Computing speaks to three organisations that have looked at the numbers
Serverless cloud is growing in terms of both adoption and use cases. We asked representatives from two monitoring and analytics vendors and from the Cloud Native Computer Foundation (CNCF) for their views as to how serverless is changing and what we can expect to see next.
Serverless is growing
In New Relic's recent report For the Love of Serverless, the company notes a 209 per cent growth in the number of global function invocations on AWS Lambda. It also describes a 178 per cent increase in the number of functions per account, which the company says indicates a deepening of adoption and a broadening of the range workloads to which serverless is being applied.
Vice president technical services EMEA at Sumo Logic, Mark Pidgeon, says serverless is "taking a similar adoption curve to containers, if not slightly higher", with 36 per cent of Sumo Logic's customers using AWS Lambda in 2019, compared with 29 per cent in 2018.
AWS is still way ahead
In its annual survey, CNCF found that 53 per cent of those using a hosted platform are on AWS Lambda, with Google Cloud Functions (18 per cent) and Microsoft Azure Functions (14 per cent) a long way behind. AWS Lambda was the first commercial serverless cloud platform and retains a commandeering lead to this day.
"There are generally more customers at a greater level of cloud maturity on AWS than the other providers," said Andrew Tunall, GM of serverless at New Relic. "But we see a lot of interest from customers, especially in EMEA, around Azure Functions".
AWS Lambda is now one of the top 10 AWS services adopted by Sumo Logic's customers. The others in that bracket are core AWS services such as S3 that came out years before the serverless platform. "It just goes to show how popular serverless is becoming with developers," he said.
Source: CNCF
DevOps is driving adoption
Serverless platforms fit best around microservices architectures where small functions start up and fire off in response to an event. The popularity of microservices for cloud-based applications is one of the main drivers.
"The transition to serverless is often driven by the need to accelerate CI/CD processes so that developers can release new features and capabilities independently and hence more rapidly," Pidgeon explained.
"Serverless is often used for specific spot tasks, like extract-transform-load of information in and out of a database within an application, or for automating deployment tasks that are required repeatedly. Those tasks are continuing to grow as more developers use serverless, but the scale and type of those tasks is definitely growing too. The number of different cloud automation tasks covered is going up, for example," he added.
Serverless is one of many options
Serverless is just one of a long list of possible options for deploying services in the cloud. As Pidgeon notes, it is best suited for small, descrete automated actions. Depending on their setup some companies may prefer to deploy to containers.
Chris Aniszczyk, CTO/COO at CNCF, directed us to a white paper that outlines situations where serverless makes the most sense. They include workloads that are asynchronous, concurrent and easy to parallelise into independent units of work; infrequent or sporadic; stateless and ephemeral; and dynamic in terms of rapidly changing requirements.
"From our experience, we see that serverless is still a very early nascent technology that is getting some use in certain scenarios," he said.
Eighty-four per cent of CNCF respondents are using containers in production, and an alternative to serverless cloud for some is containers-as-a-service, with offerings such as AWS Fargate, Google Cloud Run and IronWorker allowing users to run containers without having to manage servers or clusters. However, this approach is even newer than serverless and for New Relic's Tunall the main focus is still on serverless.
"We see a lot of interest from customers to in the containers-as-a-service space," said New Relic's Tunall. "But Lambda is the dominant serverless compute service right now."
For Aniszczyk, the approaches are not in competition; rather it's a matter of finding the right mix. "Essentially our view is that serverless and cloud-native computing are complementary, they tend to be used together, it's not a question of picking one technology over the other."
Continues...
What's happening with serverless cloud?
Serverless is gaining traction and use cases are expanding. Computing speaks to three organisations that have looked at the numbers
Use cases are blossoming
Serverless was designed so that developers could simply write a function and deploy it without having to worry about the infrastructure side. However, it was initially restricted to small scripts written in JavaScript or Python. The heavyweight libraries required by enterprise languages such as Java were a poor fit for the fire-and-forget model. However, AWS recently announced a service which tackles the so-called 'cold start' problem that had plagued Java, .Net and other languages and frameworks. Functions would take a long time to get going as new sandboxes had to be created for the libraries, resulting in degraded performance.
Source: New Relic
"What Provisioned Concurrency does is allow you to set a baseline number of concurrent requests that Lambda can process and essentially keeps all of those things warm and ready to execute code," Tunall explained, adding that New Relic is seeing more traditional enterprise languages like Java and .Net being used in a serverless context.
Provisioned Concurrency is a paid service, but overall costs can be reduced because of saved developer time.
The arrival of new services like Provisioned Concurrency means that serverless is starting to be used in different ways, including to support larger functions. Together with better integration with supporting services, some organisations are even lift-and-shifting services to serverless. Some are using frameworks like Express.js to do this by routing inside the function, while others look to Ruby frameworks such as Lamby.
According to Tunall, use of serverless in production is expanding away from "the usual Silicon Valley suspects". Financial information service Morningstar rebuilt its entire web application with serverless as the front end. Others include a contract manufacturer that reconstituted its order system on Lambda and a homeowners association that's "migrating to the cloud and completely rebuilding on serverless".
However, it's fair to say such examples are in a minority. Most still use it for specific tasks. "Many of the initial use cases for AWS Lambda are focused on cloud and DevOps deployment and automation," said Sumo Logic's Pidgeon, and indeed this is where most are still to be found.
There are still plenty of hurdles
Indeed, there are significant hurdles in the way of lifting-and-shifting to serverless - or indeed containers - and companies should beware of chasing after the latest shiny thing, said CNCF's Aniszczyk. While some companies are breaking up monolithic applications into microservices this is not without its challenges.
"The cost of migrating existing applications to one of the cloud-native models needs to be carefully considered. While a lift-and-shift model to containers may seem the cheapest, it may not be the most cost-effective in the long run. Likewise, the on-demand model of serverless is very attractive from a cost perspective, but the development effort needed to split a monolithic application into functions could be daunting."
Serverless is still relatively new and requires a different mindset on the part of enterprise developers. Teams really need to be well versed in practices around infrastructure as code (IaC).
"Serverless workloads rely on so many different resources," explained Tunall. "A particular serverless workload might be an API gateway - which can really only be configured using IaC practices in a production environment - many AWS Lambda functions, along with databases, queues, managed Kafka, etcetera. Unless your teams adopt these practices you will struggle with building production applications using serverless."
As might be expected, respondents from the data analytics vendors brought up the challenge of observability in decomposed applications. It can be difficult to build up data from systems that are both ephemeral and anonymous and which are connected to any number of supporting services. Monitoring how the application is performing, its usage rates and possible vulnerabilities is thus a challenge that needs to be addressed by analysing data from many different sources in real-time.
"The key challenge is to be able to monitor the significant increase in application complexity across all of these microservices," said Pidgeon.
Tunall added: "In an architecture with hundreds or even thousands of services that communicate with one another, it's no longer viable to have people manually deploying code and changing dependencies and production, you need tooling around that. And because you can no longer simply load it up in your IDE and click through the chain of dependencies, the lens that you have and how your application is functioning is telemetry."
What's next?
As serverless matures so integration with other services such as databases, streaming platforms and storage improves. Many of these services will be hosted on the same cloud, which has always led to fear of lock-in. For now this seems unlikely to change.
Prices will continue to drop as adoption increases, although the addition of services such as Provisioned Concurrency may make billing more complex.
The availability of more and better integrated storage options will expand the number of use cases.
"Cloud providers are going to figure out ways to make some of the tradeoffs disappear," Tunall said. "Examples are the work done by AWS to handle connection pooling more gracefully for relational databases and I imagine they'll be tackling this for storage options other than HTTP-accessible storage with more native integrations to provide more accessible storage. This will really open up new workload possibilities for function-as-a-service offerings."
However, don't expect native handling of state any time soon.
"I don't know that they'll provide durable storage attached or as part of the function, and I think that it'll provide more more convenient attachment points for services like ElastiCache or other storage services."
While much of the research outlined here concerns market leaderAWS Lambda, other platforms are also growing, including CloudFlare Workers and Twilio Functions. More are likely to arrive, with some specialising in certain niches rather than going head to head with Amazon.