What is Serverless Computing? Should You Use Serverless in Your IT Stack?

12 Nov 2020 by Datacenters.com Cloud

True or false – developers spent countless hours solving business challenges with code? I’ve personally never met a programmer that didn’t try to automate a process or task with code. Most programmers go out of their way to automate even if it takes longer than doing it manually. It’s all about the code. 

That's a compliment by the way.

With that being said, developers are often tasked with the procurement of physical or virtual infrastructure for their IT environment and applications. Sure, that’s the role of DevOps, but a lot of time gets dedicated to building and managing environments. Even the coding process itself can also become centered around the infrastructure layer.

In addition to relying on developers for infrastructure, they’re also tasked with ensuring that the environment is functioning properly. And if something goes wrong, they’re responsible for troubleshooting the issue to resolution. How much time do developers spend building and managing environments? In the era of digital transformation, it makes more sense to be focused on coding applications, integrating systems and automating business processes.

Over the last decade, a lot of innovation has taken place in IT – cloud computing, virtualized infrastructure, platforms, and software. All of this is focused on one thing – streamlining the procurement of cloud servers and storage resources into a consumable, pay-as-you-go, and for what you use utility. The trend is your friend. Automation is here and it’s here in a big way.

With serverless computing, developers do not have to understand the physical infrastructure, virtual environment, or operating system (OS) IT workloads run on. It’s all taken care of by the cloud service providers (CSPs).

In this article, we’ll examine the emerging role of serverless computing in the IT stack. We’ll look at what serverless computing is, how it works, and its benefits. Lastly, we’ll look at specific use cases for serverless computing. If that sounds interesting, you should definitely keep reading.

What is Serverless Computing?

What is serverless computing? A definition for serverless computing is an implementation model for the cloud where the cloud provider dynamically allocates and charges its customers for the computational and storage resources required to execute a specific bit of code. Serverless computing is sometimes referred to as Function as a Service (FaaS).

There is a common misconception about serverless computing that there are no servers involved – physical or virtual infrastructure. This is false. There must be servers to execute the code, right? It’s important to note that everything but the code is handled by the cloud provider in the serverless computing model. There are underlying bare metal servers, hypervisors, OS, and management layers but it’s not something that you have exposure to or deals with. It’s all taken care of by the cloud provider. It’s the provisioning and maintenance of the environment that your applications run on. There’s no patching or updating of the OS.

How Does Serverless Computing Work?

Serverless computing is a tough concept to grasp but if you think of it from the perspective of an executable function or task, it makes a lot more sense. Some developers may refer to serverless as Backend as a Service (BaaS). It’s an environment where an app would connect to a “backend” server in the cloud. While this is somewhat accurate, the concept of FaaS makes a lot more sense when thinking about how serverless environments work.

With FaaS, the developer writes code that simplifies the business process and then uploads it to a serverless cloud provider. The provider automatically spins up the cloud resources in the background – hardware provisioning, virtual machine deployment, container management, and tasks such as multithreading.

When you think about serverless, I want you to think about an “event-driven” world. This is the key concept as to the inner workings of serverless computing. It begins with the code triggering a “request.” The request is executed and the serverless provider charges just for the computational time utilized execute the code. This is different than traditional cloud computing models where the CSP charges its customers based on an hourly or monthly rate for maintaining virtual machines and cloud storage.

To take it a step further, think of serverless as a “processing pipeline” of executable tasks or “functions.” These tasks and functions could combine to form a larger application workflow with interactions taking place between code operating in other environments – virtual or physical.

Benefits of Serverless Computing?

What are the benefits of serverless computing? There are many benefits associated with serverless architecture – resource re-alignment and focus, cost-savings, and infinite scalability to name a few. However, out of these benefits, the largest benefit to serverless is the right-sizing infrastructure for specific applications and business processes.

DevOps Resource Re-Alignment & Focus

Serverless greatly reduces the time and focus of IT on procurement, maintenance, and management of physical and virtual infrastructure. It allows developers to spend more time focused on their applications – the coding and automating business processes. Serverless allows IT to shift resources and focus on other priorities within the department and organization.

Serverless Infrastructure Cost-Savings

Can serverless computing save you money? Will it actually reduce your infrastructure costs? The answer is yes, and it’s proven time and time again. With serverless computing, customers pay for the exact resources they use rather than spending money on unused resources that sit idle. This is true whether comparing traditional cloud services or physical infrastructure.

Near Infinite Scalability

One major benefit of cloud computing is scalability – the ability to spin up computational and storage resources on-demand. However, with traditional cloud computing, you must use scaling policies to spin up those resources. With serverless architecture, scaling is automatic, and based on the number of functions or tasks requested. There’s virtually no limit to the number of processes that serverless can handle.

In addition to scaling up, serverless computing will also scale down. This type of flexibility is paramount to the efficiency of serverless architecture. It can scale up during peak times and down to nothing during lulls in function capacity.

Disadvantages of Using Serverless Architecture?

What are the disadvantages of serverless computing? Should you use serverless architecture for everything in your IT stack? The simple answer is no. Serverless computing is not perfect.

Ephemeral, Stateless Architecture

One of the downsides of serverless includes ephemeral – this means that once the function is processed, it’s pretty much lost after that. It will not retain any stateful data from formerly run processes. There is a significant risk that if the function has errors or isn’t configured correctly, it will not be able to be processed and previous functions in the queue could be lost permanently. This would apply to transaction processing.

Possible Latency Issues

As mentioned, it’s a stateless architecture so it does not retain any stateful data. It has no reference. Therefore, it’s possible that the serverless code you deploy may take as long as a few seconds to spin up the appropriate resources. This is a significant risk for applications that require low latency.

Vendor Lock-In Problems

If you’ve built your infrastructure around serverless architecture provided by a specific provider, you could be at risk of vendor lock-in. Do all serverless computing services function in the same way? Are they set up the same? The answer is no. There are differences between AWS Lambda, Azure Functions, and Google Cloud Functions. Make sure to look at whether or not your serverless provider offers or supports an open-source option.

Example of Serverless Computing

Netflix Use of Serverless Architecture

Publishers upload thousands of files to Netflix daily and those files need to be encoded and sorted before being streamed to users. The files are uploaded to AWS S3 object storage which triggers a serverless function in AWS Lambda which then splits the video into five-minute chunks that get encoded into 60 different parallel streams that Netflix needs. Once all of the videos are processed, they are aggregated and deployed using rules and events.

Netflix also uses serverless computing as part of their backup strategy. As files are changed or modified, Netflix uses AWS Lambda functions to check whether or not the file needs to be backed up. If anything happens to a file, Netflix can backtrack to the source of the problem and restart the process.

Serverless technology is also used by Netflix for security. Netflix uses AWS Lambda functions to start and stop instances in the cloud. This process is validated so that it is in accordance with the system’s rules and regulations. It is also used to create alerts and shutdowns for unauthorized access.

Conclusion: Hybrid Infrastructure is the Way to Go!

There are obviously many advantages to serverless computing. It allows developers and IT to focus on what they do best which is coding and keeping IT running smoothly. There are also disadvantages such as stateless architecture, latency concerns, and vendor lock-in.

The point is that there is no “one solution fits all” when it comes to your applications and IT environment. I believe that we will see the growth and adoption of serverless computing as more developers and IT departments experiment with its capabilities. I also believe it will play an integral part in cloud computing and its advancement.

Want to learn more about cloud computing and serverless architecture? Make sure to contact us for a free consultation. We can help you architect your cloud environment and incorporate serverless technologies where it makes sense.


Datacenters.com Cloud

Datacenters.com provides consulting and engineering support around cloud managed services and solutions and has developed a platform for Datacenter Cloud providers to compete for your business. It takes just 2-3 minutes to create and submit a customized cloud RFP that will automatically engage you and your business with the industry leading datacenter providers in the world.


Subscribe to Our Newsletter to Receive All Posts in Your Inbox!