Serverless Cloud Computing: Is It Right For You?

Function-as-a-service may be the future of cloud, but not all applications are candidates.

By Paul Gillin

By Paul Gillin September 19, 2019

As Ryan Kroonenburg prepared to apply for a solutions architect job at Amazon Web Services in 2015, he was stunned by the cost of training required for the necessary certifications. Many online courses cost $2,000, with as many as five required for each credential he needed.

The situation sparked an idea to create his own training courses. The first one, which he recorded in his London apartment, was a viral success. That’s when he knew he needed a scalable platform to take his venture to the next level. After enlisting his brother, a software developer, to help, the two realized they didn’t have the funds to pay for dozens of physical or virtual servers needed to run their fledgling business. That’s when they discovered Lambda, an Amazon “serverless” platform that offers almost infinitely scalable computing.

“Serverless is the next big revolution,” Kroonenburg said in a video interview at AWS Summit 2017. “You don’t have to worry about servers; you can just focus on your code.”

That’s possible because serverless abstracts away most of the burdensome, often repetitive tasks like provisioning infrastructure. It allows operations to focus on the business logic at the heart of an application, explained Nande Konst, a developer, in a contributed article to Medium.

Kroonenbug also discovered that the cost for serverless was “ridiculously cheap.” He said workloads that would have cost him $30,000 per month on cloud servers were now a small fraction of that, thanks to a combination of promotional pricing and the much lower cost of serverless functions.

The cost plummets with the serverless public cloud model because it allows users like Kroonenburg to pay for the actual amount of resources consumed by an application, rather than having to pre-purchase units of capacity. The cloud provider owns and runs the server and dynamically manages the allocation of machine resources, keeping a tally and charging only for usage.

[Related: Everything You Need to Know About AWS Firecracker]

In this way, serverless advances cloud computing’s “pay by the drink” model with pricing that’s pegged to the service rather than the overhead of the supporting infrastructure.
Serverless computing allowed the Kroonenburg brothers to found A Cloud Guru, which has more than 850,000 customers who pay less than $30 per month for unlimited access to a growing library of more than 60 courses. The infrastructure cost is a fraction of conventional servers and scalability has never been an issue, allowing the Kroonenburg brothers to run their small business on a tight budget.

Making Infrastructure Invisible

Whereas cloud computing made the management of physical servers invisible to the user, serverless computing does away with the need to set up and administer servers altogether by supplying software functions as a service.

Unlike full-blown software-as-a-service applications, functions can be tasks, such as checking a credit card number against a list of stolen accounts. Users access software functions without knowing or caring where they run. Developers can be more productive because they’re freed from the need to attend to infrastructure. Businesses benefit from lower costs and the ability to build applications that are easier to scale and modify.

These are the reasons that serverless offerings such as Lambda, Microsoft’s Azure Functions, and Google’s Cloud Functions may be more accurately described as function-as-a-service offerings. They deliver software functionality rather than virtual servers. Applications built on serverless technology can be smaller, faster and easier to modify than applications running on owned hardware or in traditional cloud services because users pay only for the few milliseconds of time it takes for an application to complete a workload.

“[Serverless is] more storage-efficient, CPU-efficient and memory-efficient” than conventional cloud infrastructure, said James Kobielus, an analyst at the research firm Wikibon.

Because serverless applications are assembled from services in a modular fashion rather than vertically integrated, “the programming logic is far less involved than traditional programming with fewer dependencies,” he said.

That translates into quicker development of applications that can be more easily modified.

Demand for serverless is rising. GrandView Research expects the global serverless architecture market to grow 26% annually to reach $19.84 billion by 2025. Microsoft CEO Satya Nadella has called it “the core of the future of distributed computing.” AWS CEO Andy Jassy recently indicated that if the Amazon e-commerce engine was being built today, it would be largely on serverless platforms.

Stateless and Event-Driven: Both Pro and Con

Not all software developers are rushing to serverless platforms, in part because the paradigm isn’t the right choice for every application.

“Serverless doesn’t take over everything,” said Wikibon’s Kobielus.

Two of the best features of serverless architectures are also its greatest drawbacks, he noted. One is that functions are stateless, meaning that they don’t preserve the context of an interaction but rather treat each one as new. This makes them fast, but also a poor choice in areas like e-commerce, where knowing the contents of a shopping cart is important as a customer traverses a website.

Serverless computing is also event-driven. It’s designed to respond quickly to a stimulus, such as a search query or keystroke. This makes it ideal for occasional or unpredictable requests, such as checking a photo against a database of copyrighted images.

However, repetitive functions like crunching payroll or rendering video work better with more traditional approaches, said Lee Atchison, senior director of strategic architecture at software analytics company New Relic.

“If you know traffic will be higher from nine to five each day, traditional scaling can handle that effectively,” he said. “But in any situation where your workload is variable, you’re going to see the biggest savings with serverless.”

Statelessness and event-driven processing enable serverless platforms to smoothly scale up and down, since the infrastructure isn’t tied to the application, said Rohit Akiwatkar, a technology consultant at Simform LLC, who has published extensively about serverless development. He said that can translate into big cost savings.

Akiwatkar cites the example of a publisher who must accommodate spikes in web traffic when a content item goes viral. With a serverless content delivery platform, “they wouldn’t have to run virtual machines at peak capacity all the time because the functions would scale automatically,” he said.

Changing the Traditional Mindset

The real challenge to serverless adoption may be changing the developer mindset that applications and their infrastructure must be bound together, but Wikibon’s Kobielus believes that can be overcome.

“When you think about it, orchestrations that happen at the database transaction level can be executed as services on a separate cloud platform,” he said. “The vast majority of what most applications do can be rendered as serverless functions.”

Serverless computing is one of the most recent developments in the evolution of applications away from underlying hardware. It’s a trend that began with virtualization in the late 1990s, continued with public cloud infrastructure and is maturing with the advent of fully integrated software containers, application program interfaces, microservices and container orchestration. The new breed of cloud-native applications run practically anywhere, scale almost infinitely and adroitly integrate functions from across the Internet. The promise of truly distributed applications may be just around the corner.

Paul Gillin is the former editor-in-chief of Computerworld and founding editor of TechTarget. He’s the author of five books about social media and online communities.

© 2019 Nutanix, Inc. All rights reserved. For additional legal information, please go here.

Related Articles