Did You Know There Are Servers In Serverless Computing ? : A Comprehensive Overview of the Serverless Computing Model

Uviekugbere Theophilus
10 min readMar 20, 2023

--

Introduction

In September 2019, after a long day at work, I received a phone call from a web developer friend who asked if I had experience with Amazon Elastic Beanstalk on AWS. I told him I had not. He was building a small web application and wanted to test it using Elastic Beanstalk. During the conversation, he introduced me to the term “serverless” and explained that it involved deploying web applications without provisioning or managing servers. I was intrigued but skeptical, especially since I was tired and hungry from work. Nevertheless, I decided to test it out myself with a personal project. Just like most people out there, for the next few years, I held onto the belief that the serverless computing model involved no servers in deploying applications. I later realized that my initial understanding of the term “serverless” was incorrect.

The term “Serverless” can be misleading when used to describe serverless computing architecture. This is because, it merely describes the end-user experience, although the user does not need to manage servers, servers are still present and performing the necessary functions behind the scenes because applications and codes usually need server spaces to run.

Overview of Serverless computing Architecture

Serverless computing is an architectural model in which a cloud provider manages the infrastructure required to run and scale applications. The main benefit of serverless computing is that the process of code execution is abstracted away from the developers thus, allowing them to focus on writing and deploying code, without worrying about infrastructure management or scaling, this responsibility is offloaded to the cloud providers. This can significantly reduce development time and cost, while also improving the scalability and flexibility of applications.

source: https://aws.amazon.com/lambda/resources/customer-testimonials/accolade-serverless-architecture/

The cloud provider automatically provisions and manages the resources necessary to run the code, including storage, memory, and computing power as per the demand of the developer to meet business needs. With serverless computing, Businesses and developers only pay for the resources used when their applications are actually running, leading to cost savings and increased efficiency. This model also allows for automatic scaling based on demand, ensuring that applications can handle sudden increases in traffic without any intervention from developers. Some popular serverless computing platforms include AWS Lambda, Microsoft Azure Functions, and Google Cloud Functions.

Some Key Attributes of Serverless Computing Architecture

Serverless architecture is characterized by a few key attributes:

  1. Event-driven: Serverless computing is driven by events that trigger the execution of functions or tasks.
  2. Scalable: Serverless architectures are designed to be highly scalable, allowing them to handle large and varying workloads without any manual intervention.
  3. Cost-effective: With serverless, you only pay for the exact amount of computing resources you use, which makes it very cost-effective.
  4. Managed by a third-party provider: The cloud provider is responsible for managing the underlying infrastructure and ensuring the availability, scalability, and security of the service.

The serverless computing architecture is typically divided into two main categories of offerings:

  1. Backend-as-a-Service (BaaS): This type of serverless architecture enables developers to easily and quickly build and deploy web or mobile applications without the need for backend infrastructure. Cloud providers typically offer pre-built, scalable backend services and APIs for common backend functionality such as database management, user authentication, and push notifications. This allows developers can focus on building the front-end of their applications while leaving the backend management to the BaaS provider.
  2. Function-as-a-Service (FaaS): This type of focuses on the deployment of individual functions, triggered by specific events or requests. These functions are often used to perform specific tasks, such as image processing, data transformation, or API gateway functions. Examples of FaaS providers include AWS Lambda and Google Cloud Functions,
source: https://www.datadoghq.com/knowledge-center/serverless-architecture/#tools-that-support-serverless-architecture

Serverless is not Faas but Faas is serverless : Key difference

FaaS (Function as a Service) typically enables the execution of small pieces of code in response to events, without requiring the management of underlying server infrastructure. FaaS allows businesses to focus on writing and deploying code that runs specific business logic.

The event-driven nature of FaaS allows for rapid and scalable execution of code, triggered by events such as API calls, file uploads, or database updates, leading to more efficient and cost-effective development and deployment of applications.

Serverless computing model focuses any service category where configuration/infrastructural management of the underlying servers is abstracted from the users. FaaS is a specific implementation of the broader serverless compute model and people often use the two terms interchangeably, but it important to understand FaaS is only a subset of serverless computing model. As a result, the characteristics of serverless are true for FaaS.

Now lets take a look at the emergence of Serverless Computing.

History of Serverless Computing Model

The history of serverless computing will never be complete without taking a sneak peek at the the evolution of application deployment. Understanding the evolution of application or software deployment is crucial to appreciate the emergence of serverless computing.

In the past, system administrators would set up physical servers to deploy software. This involved installing the operating system, device drivers, and ensuring there was sufficient memory, disk, and processing capacity. They were also responsible for hardware upgrades and maintenance. This setup is known as a “bare metal” environment, where there is a strong coupling between the physical hardware and the deployed software. This was a tedious and time-consuming process, which made application deployment slow and inflexible.

Then came the era of virtual machines (VMs), which enabled multiple operating systems to run on a single physical server. This allowed developers to create applications in one environment and deploy them in another, eliminating the need for hardware configuration. VMs provided a level of abstraction that made application deployment more agile and efficient.However, VMs still required significant overhead in terms of managing the underlying infrastructure, which led to the emergence of containerization.

Containers offered a lightweight and portable way to package applications, along with their dependencies and configuration, into a single unit that could run anywhere. With the rise of containerization, the need for infrastructure management reduced, as containers could be deployed on any machine that had a container runtime installed. This was the foundation for the serverless computing model.

Finally, serverless computing emerged as a new paradigm, where developers can deploy and run their code without having to manage the underlying infrastructure at all. In this model, the cloud provider takes care of all the server management, scaling, and maintenance, while developers only need to worry about their code. The unit of deployment is now a function or a piece of code.

In the early 2000s, Salesforce.com pioneered the concept of cloud-based software-as-a-service (SaaS). This idea enabled companies to access software applications over the internet without the need to install or maintain any hardware or software on their own premises.

source: Google

In 2008, Google introduced Google App Engine, which marked a significant milestone in the evolution of application deployment. With this platform, developers could create software and deploy it on Google’s cloud without having to worry about server provisioning, operating system updates, or other technical details. This paved the way for a new era of cloud computing where developers could focus on writing code rather than managing infrastructure. In November 2014, Amazon followed suit by launching its first main stream Faas service called Lambda, which further simplified the development and deployment process. With these serverless offerings, developers could create and deploy software at scale without worrying about hardware, scalability, or maintenance.

Current state of Serverless Computing

I believe the transition from monolithic to decoupled, microservice architecture, of designing software and applications, as well as the rise in the demand of event-driven architectures has been significant in driving the adoption of the serverless computing architecture. Monolithic architectures have limitations when it comes to scalability, deployment, and maintenance. In contrast, microservices allow developers to break down complex systems into smaller, manageable parts, making it easier to deploy and maintain them. Serverless architectures provide a way to execute these smaller, independent parts of a system, thus enabling the decoupling of code and infrastructure. This approach can significantly reduce the operational overhead, costs, and time-to-market for developers. As a result, more and more companies are moving towards serverless architectures to take advantage of their benefits.

According to global market insight, a global market research and management company, the serverless architecture market size exceeded $9 billion in 2022 and is expected to expand at over 25% CAGR from 2023 to 2032

source: https://www.gminsights.com/industry-analysis/serverless-architecture-market#

Serverless has demonstrated that it is the operational model of the future. Over the past year, we’ve seen 125 percent growth in the number of serverless function invocations on Vercel, fueled by serverless-oriented frameworks like Next.js.

— Guillermo Rauch, CEO, Vercel

The serverless ecosystem has evolved a lot since it’s inception and has reached a level of maturity, although there is still room for significant improvement as new frameworks are introduced. The lines between serverless and container-based technologies have become blurred, resulting in a wide range of options for organizations. As a result, large number of Organizations operating in the cloud have adopted serverless computing architecture to meet their business needs.

Benefits of Serverless architecture

Serverless computing offers many benefits for organizations and developers looking to build and deploy applications quickly, efficiently, and cost-effectively. Some of the benefits of the microservice architecture includes :

  1. Reduced Operational Costs: Serverless computing eliminates the need for managing servers and infrastructure, which reduces operational costs and allows organizations to focus on building and deploying applications.
  2. Scalability: Serverless computing platforms automatically allocate and scale resources as needed, based on the demand for an application. This enables applications to scale quickly and easily, without the need for manual intervention.
  3. Increased Development Speed: Serverless computing platforms allow developers to focus on building and deploying applications, rather than managing the underlying infrastructure. This can increase development speed and improve time-to-market for new applications.
  4. Pay-per-use Pricing: Serverless computing platforms offer pay-per-use pricing models, meaning that users only pay for the resources used by their applications, rather than for a fixed amount of resources. This helps to reduce costs and improve cost-effectiveness.
  5. High Availability: Serverless computing platforms typically offer high availability and fault tolerance, with automatic failover and redundancy built-in.
  6. Reduced Maintenance: Serverless computing platforms are fully managed by cloud providers, meaning that there is less need for maintenance, updates, and patching of servers and infrastructure.

Challenges of Serverless architecture

while serverless computing offers many great benefits, it may not be the best fit for every use case. Developers and organizations should carefully evaluate the pros and cons of serverless computing before deciding whether to adopt this architecture for their applications. So here are some of the challenges associated with the serverless computing architecture

  1. Cold Start Latency: Serverless computing platforms may experience latency when a function is triggered for the first time, as the platform needs to initialize the required resources. This is known as a “cold start,” and can result in increased latency for the first user request.
  2. Limited Control: Serverless computing platforms are managed by cloud providers, which means that developers may have limited control over the underlying infrastructure and resources. This can make it difficult to customize the environment or optimize performance for specific use cases.
  3. Vendor Lock-in: Serverless computing platforms often require developers to use proprietary tools and services, which can lead to vendor lock-in and limit the ability to switch to other platforms.
  4. Limited Statefulness: Serverless computing platforms are designed to support stateless functions that perform a specific task or service and then terminate. This can make it challenging to build applications that require long-running processes or maintain stateful connections.
  5. Debugging Complexity: Debugging serverless applications can be more complex than traditional applications, as it may require analyzing logs across multiple functions and services.
  6. Cost: While serverless computing model can be cost-effective for applications with variable workloads, it may not be cost-effective for applications with constant high demand.

Serverless Business use cases : Coca-Cola, HomeAway, and others

After 20 years of operating its own on-premises data centers, Coca-Cola migrated to Amazon Web Services (AWS) in 2013. Earlier that year, the company’s Super Bowl commercial generated a spike in website traffic that oversaturated its servers, catalyzing Coca-Cola’s decision to move to the cloud. Since its migration, Coca-Cola has reduced its operational costs by 40 percent and IT ticket volume by 80 percent. — https://aws.amazon.com/solutions/case-studies/innovators/coca-cola/

  • Event-driven processing: Serverless architecture is often used for event-driven processing such as processing data from IoT devices or real-time data streams. Companies like iRobot and Autodesk have implemented event-driven architectures using AWS Lambda.
  • Serverless APIs: Companies like Nordstrom and Coca-Cola have used serverless architecture to create APIs for their mobile applications using AWS API Gateway and AWS Lambda.
  • Image and video processing: Serverless architecture can also be used for image and video processing. Companies like Netflix and Airbnb have used AWS Lambda for image and video processing tasks.
  • Chatbots: Serverless architecture can be used to develop chatbots that interact with customers. Companies like Capital One and Expedia have developed chatbots using AWS Lambda and API Gateway.
  • Batch processing: Serverless architecture can also be used for batch processing tasks such as data analytics and ETL (extract, transform, load). Companies like Coca-Cola and Thomson Reuters have used AWS Lambda for batch processing

Conclusion

In conclusion, serverless computing model is a promising technology that is changing the way we approach application development and deployment. It offers numerous benefits, including reduced costs, improved scalability, and increased agility. While it may not be the perfect solution for every use case, it has certainly gained significant traction in recent years and is likely to become even more popular in the future. With the ability to focus more on the application logic and less on the infrastructure, developers can now deliver more value to their customers in less time. As such, serverless compute Architecture is definitely a technology worth considering for any organization looking to modernize their application development and deployment processes.

--

--

Uviekugbere Theophilus
Uviekugbere Theophilus

Written by Uviekugbere Theophilus

I am a Cloud/Devops engineer with sound knowledge and technical experience in Automation, Building and Deployment processes for Operational excellence.

No responses yet