Server towers against close up of clouds - serverless computing concept
PHOTO: Shutterstock

With application availability and performance demands ever increasing, many companies are looking to the cloud to scale faster, with lower costs. That's why the serverless market had a 75% growth rate in 2018.

We’ve discussed the difference between containers and serverless computing, so in this article we'll cover what a serverless application is, what its advantages and disadvantages are, and when its best to use serverless applications.

What Is a Serverless Architecture?

"In a nutshell, serverless is a cloud computing architecture that allows developers to build and run code without having to manage, provision, or monitor infrastructure," said Mike Duensing, CTO of Skuid. Getting into specifics, Duensing says some of the unique characteristics of serverless include, "no server management, pricing by consumption, scales with use, and built-in availability and fault tolerance." What this means is businesses can focus on developing applications without worrying about the infrastructure needed to run them. 

Amir Jerbi, CTO of Aqua Security puts it even more simply, "'Serverless' is actually a poor name for 'Function-as-a-Service' (FaaS), a method of running code on demand, with no need to manage any infrastructure." He explains that the applications do still run on servers, but those writing the code don't need to know anything about the servers. Some of the most common serverless services include Microsoft Azure Functions and AWS Lambda.

"At its heart, serverless computing offers a dynamic every DevOps team seeks to provide their back-end engineering team — an application substrate that 'just works' all the time," said Jonathan Sullivan, CTO of NS1.

Related Article: Containers vs Serverless Computing: A Competition or Natural Progression?

Advantages of  a Serverless Architecture

Less Maintenance

"Serverless allows developers to focus on coding and less on operations," said Duensing. With serverless, explained Sullivan further, the "development team can think less about buying, operating, patching and upgrading infrastructure, because that's probably not core to their business." Instead, serverless providers automatically horizontally and vertically scale to meet demand, handle any other resource provisioning necessary and ensure the application has the backend infrastructure it needs to run. Ultimately, Sullivan says, serverless can "free up engineering cycles to focus on what's really important: building an application and serving customers."

Lower Costs

"From a cost-benefit perspective an organization only pays for resources it uses, rather than renting or securing servers in fixed quantities, or maintaining always-on cloud compute or co-located resources 24x7," Sullivan said. Duensing agreed this can potentially be a lot cheaper depending on the workload. He added, "Pricing by consumption means companies only pay for metrics like the number of times a code runs, memory and execution duration, without paying for idle time when the code isn’t running." Serverless is entirely on-demand and pay-as-you-go, leading to lower costs for many organizations.

Related Article: Why Move Your Contact Center to the Cloud?

Disadvantages of Serverless

While serverless applications can be convenient and cost-effective for many organizations, it's essential to understand the tradeoffs.

Vendor Lock-In

"With serverless, an organization is forfeiting complete control over the infrastructure," Sullivan said. Less control has the upside of convenience, but Sullivan explained, "it also means their engineering team has written their entire application against someone else's platform." Writing code that's meant to run specifically for one serverless platform and its proprietary APIs is the definition of vendor lock-in. Duensing agreed that serverless applications "become somewhat tied to a third-party vendor and it becomes an effort to change platform or provider."

Performance

Since there are no servers to manage, many tech teams often overlook application performance metrics. "Enterprises using serverless technology to build applications aren't freed from the physics of latency, fiber cuts or performance issues with the provider," explains Sullivan, "because just like the cloud, there's a server at the end of that rainbow — they just can't see it." Organizations using serverless applications still need to monitor and retain control over their traffic to make sure users aren't experiencing performance issues. 

When to Use Serverless Applications

For companies interested in using serverless applications, Sullivan said "rapid prototyping can be a worthy entry point or a chance to dip their toes in the water." Serverless isn't right for every organization, so it's best to start small and experiment with applications that can be quickly deployed.

"Serverless is very suitable to run stateless applications, i.e., applications that don't maintain user state and data over long periods. It's very cost-effective for applications that don't need all of the components to run all the time — such as event-driven functionality, batch jobs or data transfer via middleware," said Jerbi. Duensing agreed, but added "[serverless] is not suited for a long, compute-intensive application since it can become expensive compared to running it on a dedicated compute instance." Serverless isn't right for every application, but can offer considerable advantages for those that are stateless and only need to run periodically.

"With evolving serverless offerings and major investments from cloud darlings AWS, Microsoft, Google alongside enterprise stalwarts like IBM and SAP, we're just now seeing the beginning of how serverless is going to impact the way applications are built and delivered," Sullivan said.