When Serverless Makes Sense

Jameson Welch
January 25, 2023

The term ‘serverless’ can sound somewhat contradictory since serverless resources are, in fact, using servers. But the concept derives its meaning from the perspective of the business that deploys it rather than the host cloud provider managing the resources. 

If you only need a car twice a month for an hour, why buy a whole car when you can spend significantly less money renting one? You only pay for the car for the time you need it. This is the essence of serverless - only pay for the resources when you need it. We will take a closer look at what serverless is, how it works, and when it makes sense to use it for your next project.

Cloud Provider Managed

At its core, serverless computing is a cloud computing architecture in which the cloud provider is responsible for managing and allocating the servers for running the application. This means that instead of having to provision and maintain your own servers, you can simply write and deploy your code, and the cloud provider will handle the rest. The compute resources for your project automatically scales up and down relative to usage without needing your input. If your serverless project goes from 3 requests to one million, an adequate amount of resources are applied so that all one million requests can be serviced without a lag in completion.

Usage Cost Efficiency

One of the biggest advantages of serverless computing is its flexibility and cost efficiency. Since you only pay for the specific amount of resources and compute time used, you can scale your application up or down as needed without having to worry about the costs of maintaining your own servers - which can be expensive in both time and money. This makes it a great option for projects that have variable or unpredictable workloads. Like the car analogy, without serverless, you’d have to buy a computer (server) or provision one from a provider, but if it’s not being used at any given moment, you still have to pay for it.

Personnel Cost Efficiency

Another advantage of serverless computing is the ability to focus on writing code, rather than managing infrastructure. With serverless, you can simply write your application and let the cloud provider handle all the underlying infrastructure, which can save a lot of time and effort. The alternative? Aside from hiring a developer, you’d need to hire an IT professional to handle the networking, maintenance and troubleshooting. That’s not to mention the hardware you’ll now have on your balance sheet.

There are many use cases for serverless computing, but some common examples include:

  • Event-driven applications, such as image resizing or sending notifications
  • Microservices, which are small, independent services that can be combined to build larger applications
  • Backend for mobile or web applications, where you need to add some functionality to your app but don't want to handle the infrastructure.

When Not to Use Serverless

Serverless computing may not be the best option for all projects. For example, if you have a high-performance application that requires a lot of resources in extended usage time, heavy single-threaded compute requirements, or if you have strict compliance requirements that the cloud provider can't meet, then serverless may not be the best choice. Providers like AWS and Google structure their pricing around usage time and often have limits to how long you can initiate a serverless feature. AWS’ Lambda gets expensive to run if execution time reaches into the minutes. And if you’re constantly using this resource, you’d be better off going with EC2 or containerized services like Fargate.

Serverless computing is a powerful and flexible option for building and deploying cloud-based applications. It offers many advantages, such as cost efficiency and ease of management, but it may not be the best option for all projects. By understanding the benefits and limitations of serverless computing, you can make an informed decision about whether it's the right choice for your next project.

Apothic Research Group specializes in serverless architecture for applications ranging from data pipelines (ETL/ELT. etc.) to API implementation. We can design, build and manage your data infrastructure for you so you can focus on what you do best!

Interested in working with us?

Reach Out