What is Function as a Service (FaaS)?

Hero Image

Function as a Service seems to be the new black. But what is it? This brief post will explain it.

First, there was a Function

Here is the function, saved to the faas.js file:

module.exports = function (ctx, cb) {
    cb(null, 'Hello from a Function');

Second, we make it a Service

Now, we convert the function to a service with wt-cli:

npm install -g wt-cli
wt init
wt create faas.js

Voila, Function as a Service

What comes back is a URL, which is the Function as a Service. It may look like this:


Go ahead and call it. It is a service.

Wait, what just happened?

We have used the CLI of Auth0 Webtasks to turn a Node.js function into an HTTP endpoint that can be called from a mobile or HTML5 app, or just with curl. Auth0 Webtasks is all about making developer's life simple - all you need is a function. Webtasks turn it into service. Learn more at https://webtask.io.

Function as a Service vs Serverless

How is Function as a Service (FaaS) different from serverless? It is not. At the core it represents the same trend explained in the What is serverless? and on Martin Fowler's blog Serverless Architectures.

The key difference is emotional. The term server-less is both inacurate (there are still servers involved), as well as socially controversial, since it suggests looming structural unemployment of swaths of IT personel who make their living by running those servers today. The Function as a Service (FaaS) term is clearly less radioactive. Read more about the merit of the trend at What is serverless.


Most Recent

23 June 2022
Is EdgeDB the Future?

EdgeDB solves some design flaws of relational and No-SQL databases. Read the differences between EdgeDB, MongoDB, and GraphQL and the best use cases for EdgeDB.

22 June 2022
Trello API Limits, 5 Best Practices to Avoid Rate Limiting

Third-party APIs like the Trello API can make life easier for developer. We'll discuss best practices to avoid rate limits in the Trello API.

22 June 2022
Using the Google Calendar API in React.js, An In-Depth Guide

We'll build a simple React app that uses Google Calendar API and that lists and adds events to your calendar. Let’s dive in.