...

/

Function as a Service (FaaS)

Function as a Service (FaaS)

Learn about the cloud's Function as a Service (FaaS) model.

What is serverless?

Before discussing the Function as a Service model, we need to understand serverless computing. Even though these two terms are used interchangeably, they are not the same. When we hear serverless, it gives the impression that no servers are involved anywhere! That is not possible. Code needs to run somewhere. Servers are very much involved in serverless computing. It's just that we don't have to deal with any of the underlying infrastructure. We can think of it as outsourcing all cloud infrastructure management (provisioning, maintenance, etc.) and scaling to the cloud vendor.

Serverless comprises two approaches:

  1. Backend as a Service
  2. Function as a Service

Backend as a Service

With this approach, we consume backend cloud-hosted services such as databases, authentication, storage, and so on from a third party. We only develop front-end applications and consume backend services via APIs (Application programmable interfaces) and SDKs (Software Development Kits).

Backend as a Service is an umbrella term that can be used for any service that is offered in a similar fashion. Some examples are Database as a Service (DBaaS), such as Google's Firebase, Authentication as a Service, such as Auth0, etc.

Function as a Service

Function as a Service refers to the cloud service model where developers write service-side logic and host it on stateless compute containers. These containers can be triggered based on events (such as HTTP requests, ...