3 min read
on Jul 3, 2019
A look at the benefits and disadvantages of serverless computing.

This is a guest post from Algoworks, a custom software development and consulting company, and a PubNub Development Partner.

Software systems have witnessed a tremendous evolution since the olden days of computing. Back in the day, all software ran on gigantic mainframe computers. But as computers continued to become smarter and more powerful, the need to have computers dedicated to performing server tasks continued to decrease. And this eventually led to serverless.

Serverless computing is a cloud computing execution model where the cloud providers manage the allotment and provisioning of servers dynamically. Serverless applications depend on third-party services and custom code that run in transitory containers. Instead of pre-purchasing compute capacity, the pricing of the architecture is modeled on the basis of the number of executions.

Serverless relies stiffly on microservices with codes organized on FaaS platforms. Microsoft Azure Functions, AWS Lambda, and Google Cloud Functions are a few examples of FaaS platforms.

Advantages of Serverless Computing

Amplified Scalability

Applications can handle load only to a certain level. If you want to build a complex, intricate application, harnessing serverless architecture is a great option, as it enables automatic scaling when the influx in concurrent users and devices, or heavy loads of data arises. Scaling efficiently and reliably also depends on considering the users’ geographical location so serverless infrastructure providers must have points of presence around the users. This helps in reducing delays and enabling the application to function just like it should, irrespective of the geographic location.

Reduces Costs

Managing servers is expensive. A major benefit of serverless is that it helps you cut costs, given there are no hardware expenses included. When your application code is finished running, you don’t pay for the infrastructure assets anymore. It’s a pay-as-you-use model.

Easy Deployment

Serverless steps up as a perfect solution if you need to roll out your application quickly. A week or month long application deployment can turn into a task of merely a few hours. All of this comes to reality when you get to focus on the code for its quick release instead of worrying about the infrastructure.

Better Productivity

Serverless computing makes developers more efficient. According to studies, developers spend 30% to 40% of their time struggling with infrastructure issues.

Developers should be focusing on writing code, not investing their time and energy into operating and maintaining frameworks. If you opt for serverless computing, developers will find a lot more time on their hands to focus on their core tasks.

Enhanced User Experience

End-users don’t care about the backend, the infrastructure, or the code that you’ve written. They care about the frontend, the interfaces they’re seeing and experiencing.

With server maintenance out of the way, organizations can invest their effort and time to enhance elements that delight end users. An app with a fantastic UX design is crucial if you want to attract and engage your users strongly.

Disadvantages of Serverless Computing

Though there are many benefits of serverless, like all technologies, it comes with disadvantages as well.

Cold Starts

Serverless computing allows you to pay only for what you use. But if the function is not put to use often, a sizeable performance penalty can be charged. Hosted functions face a cold start penalty, and hence, can prove to be slow be a huge margin the first time they are put up. A solution to this is to minimize cold starts by going with small and precise functions initially. Bear in mind that it is quite complicated to maintain multiple small functions.

Unfit for Long-term Tasks

Serverless works wonders for short-term processes. But when it comes to long-term tasks where functions are required to be on a continuous running spree, you might end up spending more for compute time. Tasks like uploading large video files would need extra functions to be called on.

Complex Process

The learning curve is quite steep when it comes to Serverless applications. As integration units are tiny with serverless as compared to other architectures, it calls for additional time to invest into arranging the functions so they work in an aligned manner with the data. Deployment and versioning might also be topics of concern.


Serverless architecture brings a fresh, exciting outlook. It has the capability to shine when used properly in the right places. It can be a boon, as well as, a bane, depending on how it is put to use.

More From PubNub