Advantages and Disadvantages of Serverless Computing

Serverless computing has grown in popularity in recent years. In Datadog’s 2020 State of Serverless report, 50 percent of AWS users said they were using the serverless function. And the overall serverless computing market is worth around $8 billion currently, up from $1.9 billion in 2016.

It’s important to understand the advantages and disadvantages of serverless computing so you can determine if it’s a worthwhile investment for your organization.

What are the advantages of serverless computing?

Serverless computing provides an abstraction layer between server resources and the functions they provide. That’s why it is sometimes known as Function-as-a-Service (FaaS)—the functions of the server and provided via the cloud to enable a simpler, more cost-effective way to build and operate applications. 

Simpler resource allocation

Tasks associated with servers, such as provisioning, scaling, and managing the infrastructure that is required to run the application, are offloaded from the end-users and happen automatically in the background. Thus, the simplicity of resource allocation is one of the big advantages of a serverless architecture. 

Development efficiency

In a serverless environment, developers can focus on their core duties rather than figuring out the underlying infrastructure needed to operate and support their apps. This also means developers can build applications faster than in traditional environments.


“[Serverless] greatly simplifies the process of creating and deploying applications as it enables developers to increase their focus on the value to the core of the business, increase their productivity, and bring products to market faster, since the overhead tasks related to infrastructure are abstracted away,” said Naina Singh, principal product manager, Red Hat. “Serverless Functions takes this even further by eliminating typical networking code and other boilerplate typically required by cloud-native applications.”

Dynamic scaling

Dynamic scaling, too, is facilitated in a serverless environment. The Knative open-source framework is used by many serverless vendors including Red Hat OpenShift Serverless. As Knative offers a container-based serverless solution on top of Kubernetes, scaling can be accomplished based on actual user demand, and to and from zero.

Faster deployment

Ease of deployment factors in as a major benefit. Traditional data center-based operations consume months in selecting, procuring, and deploying physical equipment. Serverless computing, on the other hand, can deploy in a few hours. 

What are the disadvantages of serverless computing?

There are some disadvantages to serverless computing including cost, visibility, and security. 

Cost

Depending on the type of application and its duration, costs associated with serverless computing can rise rapidly. Providers charge for the amount of time code is running so it may be cheaper to run applications with long-running processes using a traditional model.

Visibility

According to Cloudflare, there can be testing and debugging challenges in a serverless environment. As it is difficult to replicate serverless to see how code performs once deployed, developers lack backend process visibility. 

Security

With serverless computing, a third-party vendor is dealing with security and that can sometimes be a closed box. When applications handle sensitive data, developers need to be sure it is kept secure. For example, several different customers are going to be using the same underlying server. Thus, multi-tenancy may impact compliance in some organizations. 

Key considerations for serverless computing

Serverless computing works well in some situations, but it should be avoided in others.

Stateless applications

Singh said stateless use cases are a good fit for a serverless architecture. “While the serverless approach is a perfect match for stateless applications, it takes some extra effort to allow stateful applications (like storing session state in memory between two requests) to run in a serverless way, which is not always possible,” said Singh. 

Better flexibility

Another good fit is applications with non-uniform access characteristics and highly variable traffic patterns. Applications dealing with seasonal business spikes or quarterly financial reports, for example, are good for serverless as you only pay for what you need. 

Similarly, the flexibility of serverless computing is a huge benefit for organizations that are growing rapidly and may need to pivot quickly. Early-stage startups might particular value serverless computing, as they don’t have to fork out for expensive equipment until they have established a viable customer base.

Compliance

On the other hand, serverless can pose compliance issues. If an organization isn’t allowed to utilize a multi-tenant architecture, they should avoid serverless computing. Misconfiguration could result in data exposure and other security problems that have severe compliance implications. 

Performance

Lastly, performance must be taken into account. Anyone running applications in serverless environments needs to understand that as they are not running constantly, the code rented from serverless vendors sometimes needs to boot up and that can impact performance. 

Read next: What are Microservices?

Drew Robb
Drew Robb
Drew Robb has been writing about IT and engineering for more than 25 years. Originally from Scotland, he now lives in Florida.

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends, and analysis.

Latest Articles