6

Why the World Is Moving Towards Serverless Computing

 1 year ago
source link: https://dzone.com/articles/why-the-world-is-moving-towards-serverless-computi
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Why the World Is Moving Towards Serverless Computing

Take an in-depth look at the serverless model, explore different cloud computing delivery models, and learn about available serverless offerings in the market.

Feb. 06, 23 · Analysis
Like (2)
2.82K Views

Cloud computing is both the present and the future of business. Not only tech companies but also organizations that serve their users through IT. Cloud computing provides more flexibility, reliable infrastructure, and competitive pricing models for its customers. Organizations save their IT footprint and resources by deploying their infrastructure on the cloud instead of managing it themselves. Cloud computing platforms offer different models for various types of computing needs of their customers.

Cloud computing overview diagramDifferent Cloud of Computing Service Models

Cloud computing providers offer their services to customers based on different service models. These models are designed to cater to different customer requirements and resource needs. Aside from the various models available, there are precisely three popular models. They are SaaS, PaaS, and IaaS.

Platform as a Service

PaaS is a service model where the customer is provided with a cloud platform. This cloud platform is used by the customer to develop applications. The customers are allowed to choose the components of the platform. Customers choose the software modules and infrastructure necessary to build their applications. The platform is highly customizable, with a lot of options available for the customer to choose from.

PaaS is delivered from both public and private clouds. It can be delivered as software as well, deployed on public infrastructure.

The name of the first PaaS is Zimki, which was launched by Fontago in 2006. The original idea behind PaaS is that developers focus on writing code, while the PaaS provider deals with the underlying software and hardware modules needed to support the development.

Infrastructure as a Service

IaaS was earlier named "Hardware as a Service." This model allows customers to provision their hardware infrastructure. Cloud providers offer different combinations of classes, sizes, and types of infrastructure like servers, storage, network, and operating system. Clients can abstract low-level resources by using high-level APIs provided by the cloud provider. These hardware resources are installed in data centers and added to resource pools. Cloud providers provide these resources on demand from the pool.

The client is no longer required to manage its resources in their on-premise data centers. Clients need to pay on a per-use and plan basis for the infrastructure. IaaS provides flexibility, security, and easy maintenance for resources. Hypervisors like Oracle VirtualBox, VMware ESXi, and Xen are extensively used to virtualize the underlying physical infrastructure, add resources to the pool, and allocate those resources to clients during provisioning and scaling.

Software as a Service

In this cloud computing service delivery model, the software/applications are provided as a service. This is the most widely used and popular model now. We, as users, may be using many SaaS-based products without even realizing it.

With this model, the software is hosted centrally and regionally throughout the globe on the cloud. The vendors advertise the link to access the software. Users connect to the software via their browsers, which contain a thin client. Large internet corporations like Microsoft and Google offer their products as SaaS. The office suite and emails are examples of SaaS offerings. It eliminates the need to install software; rather, the user can use it over the internet. SaaS constitutes around 60% of total public cloud spending worldwide. 

Network as a Service

NaaS is a cloud service delivery model where the cloud provider brings in software-defined networking along with API-based services to manage networks. The customer rents enterprise networking services and components from the service provider without owning the physical networking infrastructure.  The provisioning, management, lifecycle management, deployment, and maintenance of networking infrastructure are handled by the cloud service provider. 

Function as a Service

FaaS is a computing model where the cloud provider enables its customers to deploy their code as functions. The customer develops, updates, and runs its code on the FaaS platform without worrying about provisioning and maintaining the underlying infrastructure. 

The function is triggered only when an event takes place. The customer specifies in which event the function will be executed on the FaaS platform by configuring it. The function gets executed inside a container. The functions could be written in many supported programming languages, depending on the cloud service provider. 

The customer needs to pay per event. It makes the model very cost-effective. This is also highly scalable. Depending on the traffic, the function will be scaled up or down.

A few FaaS offerings by popular cloud providers are Amazon Web Services (Firecracker), Google (Kubernetes), Oracle (Fn), Apache OpenWhisk (IBM), and OpenFaaS.

Backend as a Service

BaaS is a cloud computing service delivery model where the developer writes code for its mobile or web-based application. All the behind-the-scene services or tasks are outsourced to the BaaS vendor. The services that a BaaS vendor provides may include the following:

  1. Email Verification
  2. Cloud Storage
  3. User Authentication
  4. Database Management
  5. Social Media Integration
  6. Push Notifications
  7. Logging
  8. Searching
  9. Cache
  10. Hosting
  11. Push Notifications
  12. Geolocation

Applications need many of these services during application development. The BaaS vendor provides these services to the developer so that the developer can focus only on writing code. It relieves the developer from managing or doing these repetitive, manual tasks. The developer’s energy is more focused on application development. 

It helps scale up the process of application development. It really helps when developers need to bring in the MVP quickly. 

Serverless Computing Model

The serverless computing model is an architecture that allows the developer to focus on writing code/API, running the code, and not worrying about procuring and managing the infrastructure required to deploy and run the same code. The cloud service provider shares an API-backed interface, where the developer deploys the code after writing and building it. The code is deployed as an artifact produced by the build process. Once deployed, the cloud provider handles the resources, and infrastructure required to run the code. The cloud provider takes care of scaling the underlying infrastructure depending on the traffic. 

The developer writes the code as a set of functions. Each function has to perform a specific task. That is the implementation of the Single Responsibility Principle. The functions are triggered by specific events, like an email being delivered or an HTTP request. Each time the function is executed, the cloud provider runs it on a new server. The developer is not at all aware of how the server is provisioned. The execution process is abstracted away from the developer.

Some serverless offerings are AWS Lambda, Google Cloud Functions, and Azure Functions. 

Benefits of Serverless Computing

As many as 40% of companies worldwide have adopted serverless computing architecture. Most startups and many large global enterprises have switched to a serverless architecture. The companies are able to tap the following benefits the serverless architecture offers: 

1. Reduced Costs 

The serverless model reduces development, operational, and scaling costs. Companies save on scaling as they have an SLA with the vendor to maintain a certain response time. The vendor is responsible for meeting the SLA through automatic scaling. Companies can cut operational model costs because they only pay for the time the servers are used during function execution. Developers only have to focus on development and nothing else. 

2. Green Computing

Over the years, companies have built large data centers throughout the world to meet the growing need for IT and computing resources. This is adding to the emissions and is not at all environmentally friendly. All these huge data centers run multiple servers. The cooling system and servers must be operational 24 hours a day, seven days a week. This adds to fossil-fuel consumption and carbon emissions. 

Whereas with serverless, you need the machines only in real-time, meaning you need a server only when you need to invoke the function. The vendor could decide how much compute resources the application needs and accordingly make a wise decision about provisioning the physical infrastructure.

3. Better Operational Management

With the serverless model, there is absolutely no need to manage your infrastructure, as it is outsourced to the service provider.

4. Better Scalability

With the serverless model, scalability is not an issue at all, as it is completely taken care of by the service provider automatically. The service provider has to meet certain SLAs, and it auto-scales the infrastructure according to the traffic.

5. Enhanced Productivity

The developers only have to manage their code. They need not worry about the server, so they can concentrate their energy on writing better code. 

Different Serverless Computing Solutions

There are many offerings started by popular cloud vendors. The first commercial offering was toolsZimki, which started in 2006. Then Google launched its Google App Engine in 2008. PiCloud was the first offering that supported Python and was launched in 2010. 

AWS Lambda

Amazon launched its serverless offering, AWS Lambda, in 2014. AWS Lambda uses many other serverless tools, like the Amazon Serverless Application Model and AWS CloudWatch. It is a very mature serverless platform that supports functions written in major programming languages.

Azure Functions

Azure Functions is a Microsoft Azure Cloud offering. It provides an event-driven, serverless computing platform. It was released in 2016, and it offers out-of-the-box HTTP endpoint binding management. It supports many programming languages. Developers can run a web server to support applications written in languages that it does not support.

Google Cloud Functions

Google Cloud Functions was launched in 2016 by Google Cloud Platform. It supports many popular programming languages. Apart from that, it allows the developers to run custom runtimes so that they can run applications written in languages that are not currently supported by GCF.

Cloudflare Workers

Cloudflare Workers was launched in 2018. It combines edge and serverless computing. It supports scripting languages and other languages that could be compilable into other Web assembly and scripting languages. 

Netlify Functions

Netlifly was launched in 2018. It is a value addition on top of AWS Lambda. At present, it supports Go, TypeScript, and JavaScript applications. 

Vercel Functions

Vercel Functions was launched in 2018. It mostly supports web applications. Users can choose to get a serverless flavor or an edge computing flavor for this offering. It supports many popular scripting and object-oriented languages. It also runs on AWS Lambda

Conclusion

Through this article, I have tried to give a high-level idea about the serverless model. Users will also be able to derive different cloud computing delivery models. Apart from that, they will also be able to learn about a few serverless offerings available in the market.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK