Microservices to Functions (FaaS)

In the past, we used to have big monolithic applications with webservices created in XML/SOAP. Processing and parsing of these webservices used to take long processing time.

With the improvements in server and network architecture, we started seeing benefits in breaking the webservices into smaller pieces which paved the way to microservices. In most cases, parts of the microservices may not be used but sits in memory.

In order to manage better memory footprint and reduce the consumption costs, we can further break microservices into functions.

Functions as a Service (FaaS)

A Function is a custom code that runs on ephemeral container and often consists of few lines of code. Serverless Architecture refers to applications that depend on BaaS (Backend as a Service) and/or FaaS (Functions as a Service).

In Web and Mobile applications, when an API call is made from the client code, an API gateway that maintains the endpoint triggers a function. A function will then return an output by calling BaaS, or SaaS.

Function can be written in any language - JavaScript, Java, Python etc.,

FaaS in Cloud Stack

IaaS, PaaS and SaaS represents three layers in Cloud Stack.

IaaS (Infrastructure as a Service) - Cloud provider delivers servers with virtualization & developers are responsible to create and manage applications, middleware and runtime environment. Amazon EC2, Azure VM's etc., provides IaaS capabilities.

PaaS (Platform as a Service) - Cloud provider delivers runtime environment, virtualization, servers & developers are responsible to create applications. Amazon Elastic Beanstack, Heroku etc., provides PaaS capabilities.

SaaS (Software as a Service) - Cloud provider delivers software as a managed service.

BaaS (Backend as a Service) - Cloud provider delivers fully managed backend. Firebase with NoSql database, Auth0 provides authentication as a service.

FaaS fits in between PaaS and SaaS in the Cloud Stack. AWS Lambda, Google Cloud Functions provides FaaS capabilities.

Benefits of FaaS

  1. Faster Development - Time to code is significantly lower with high trust backend stable interfaces
  2. Faster Deployment - Smaller functions means deployment times are reduced from seconds to milliseconds
  3. Reduced Costs - Functions will be deployed only when it gets a request from the client





Good one Raghav! "developing applications in airplane mode until the product is ready for prime time" - totally agree... 

Like
Reply

Btw, I believe AWS Lambda enables the deployment of functions as a service but don't provide FaaS capability by itself.

Like
Reply

To view or add a comment, sign in

Others also viewed

Explore content categories