post banner

Serverless Application’s Architecture and Design

Author: Sakaldeep

February 05, 2019

Serverless computing is most suited for the organization who was born in the cloud. Much traditional application is not suited for cloud due to several dependencies with underlying platforms such as file systems, database and many more. In that case, we go for the lift-and-shift approach and choose IaaS. Then we slowly move to PaaS wherever the application is capable to run on a PaaS platform.

The serverless application is cloud native and it has a different design for developing, deploying and running. First, let’s brief what is the problem with application design that cannot be suited for serverless.

Monoliths Design

In monoliths application design, all the components of the application include in a single deployment such as user interface, business logic, database. Legacy application, we can found everything in the same codebase. #

The common issue with the monolith

This type of application does not perform at large scale especially when the application needs to run parallel with the same code. Another problem is whenever you need to do any changes in the application, even small changes, need to deploy the entire application.

Serverless Architecture

The serverless computing model executes the code by dynamically allocating resources on cloud provider platforms such as Azure, AWS, or Google Cloud. And the cloud provider only charges the resources that need to execute that codes.  On the background, cloud provider triggers the code based on the various events such as https requests, database events, alerts, scheduled jobs, etc that are hosted in the stateless container.

In serverless architecture, the code is sent to the cloud provider as a function and hence it is also referred to as Function as a Service (FaaS). It separates the code and hosting environment very clearly.  Separation means the DevOps team does not have to provision and manage server or containers. The necessary resource will be allocated when it gets trigger as per the scale of the code.

The advantages of the serverless architecture

  1. Multiple instances of the same code can run on the same or multiple hosts to achieve the request demand of the application.
  2. Cloud providers bill based on the code execution time which has massive cost saving impact in many cases.
  3. Automatically scale to fulfill the workloads.
  4. Focused on code rather than hosting platform.
  5. Each module can be released independently.

Microservices

In microservices,  applications are composed of several small services and each service run in its process. Each service may contain separate business logic. Services communicate with each other over API’s using HTTP as a transport. The services can be deployed and upgraded independently. Their data course can be multiple.

Total visits : 44