Serverless

Serverless architecture takes away the headache of provisioning, scaling, maintenance as they are self-managed. There is no need for DevOps in the team. In fact, all cloud services are basically Serverless architecture.

Serverless is a cloud-computing code execution model, where a certain cloud provider takes over the responsibility for servers running along with computing resources management. In simple words, there are no physical or virtual servers to manage, because they are automatically deployed in the cloud by the third-party vendors.

In this article we will learn

  • Monolithic vs Microservices vs Serverless
  • Virtual Machines vs Containers vs Serverless Computing
  • Serverless & Function As Service (FAAS)
  • Monolithic vs Microservices vs Serverless

Monolith - Monolith means composed all in one piece. The Monolithic application describes a single-tiered software application in which different components combined into a single program from a single platform.

Microservices - Microservices are an approach to application development in which a large application is built as a suite of modular services. Each module supports a specific business goal and uses a simple, well-defined interface to communicate with other sets of services.

Serverless - A Serverless architecture — also known as serverless computing or function as a service (FAAS), is a software design pattern where our function (a part of the microservice responsibility) is hosted by a third-party (AWS Lambda functions, Azure functions, Firebase cloud functions, etc),this architecture eliminates the need for server software and hardware management by the developers, the third-party service provides this automatically.

The one microservice responsibility is divided amongst many functions, which can be invoked and scaled individually

Virtual Machines vs Containers vs Serverless

Containers - 'contains' both an application and all the elements the application needs to run properly, including system libraries, system settings, and other dependencies. Any application can be run in a container. A containerized application will run the same way no matter where it is hosted.

Containers can easily be moved around and deployed wherever needed, much like physical shipping containers, which are a standard size and can therefore be shipped anywhere via a variety of means of transport regardless of their contents.

Container Architecture - Containers are a way of partitioning a machine, or server, into separate user space environments such that each environment runs only one application and doesn’t interact with any other partitioned sections on the machine.

Each container shares the machine's kernel with other containers (the kernel is the foundation of the operating system, and it interacts with the computer's hardware), but it runs as if it were the only system on the machine.

Serverless computing - Serverless applications are broken up into functions, and hosted by a third-party vendor who charges the application developer only based on the amount of time each function runs.

A serverless architecture - also known as serverless computing or function as a service (FAAS), is a software design pattern where our function (a part of the microservice responsibility) is hosted by a third-party (AWS Lambda functions, Azure functions, Firebase cloud functions, etc…), this architecture eliminates the need for server software and hardware management by the developers,the third-party service provides this automatically.

Containers vs Virtual Machines

Virtual Machine is a piece of software that imitates a complete computer system. It is isolated from the rest of the machine that hosts it and behaves as if it were the only operating system on it, including having its own kernel.

Virtual machines are another common way of hosting multiple environments on one server,but they use a lot more processing power than containers.

Serverless Computing vs Containers

Both serverless computing and containers enable developers to build applications with far less overhead and more flexibility than applications hosted on traditional servers or virtual machines. Which style of architecture a developer should use depends on the needs of the application, but serverless applications are more scalable and usually more cost-effective.

IAAS PAAS CAAS & FAAS

Public cloud vendors offer services that provide various levels of abstraction over machines. Each service outsources a different level of responsibility to the vendor. Developers can choose to deploy code to:

  • Infrastructure as a Service (IaaS) — Amazon EC2, Azure VMs,..
  • Containers as a Service (Caas) — Docker Cloud, Amazon ECS,..
  • Platform as a Service (Paas) — Heroku, Amazon Elastic Beanstalk,..
  • Function as a Service (Faas) — AWS Lambda, Google Cloud Functions,..

Each services provides a different level of abstraction and unit of scale

Platforms for Serverless

Serverless computing offers advantages over traditional cloud-based or server-centric infrastructure. Serverless architectures offer greater scalability, more flexibility, and quicker time to release, all at a reduced cost. With serverless architectures, developers do not need to worry about purchasing, provisioning, and managing backend servers. As in a 'pay-as-you-go' plan, users are only charged for what they use. Code only runs when backend functions are needed by the serverless application, and the code automatically scales up as needed.