OpenFaaS: Serverless Functions Deepdive

8 min readJul 16, 2020

OpenFaaS is a platform for defining, deploying and monitoring serverless functions written in different programming languages such as #nodejs, #python, #go, #java. It has a well-defined command-line interface and web-based UI. OpenFaaS functions are effectively fully-customizable Docker containers. Read in this deep-dive article how to use OpenFaaS and customize your serverless function with any additional tooling or software package that you need.

Hosting applications in the cloud requires servers and computing resources. Usually you define the number of servers that you will need to run your application, provide the servers and deploy your app. By monitoring you see the actual resource consumption, and can scale down or up. With Kubernetes, this task becomes as easy as executing kubectl scale deployment lighthouse --replicas 10. But still you need enough servers that can actually provide the capacity for your apps.

Let’s take this idea to the next level. Imagine your application consists of stateless, loosely coupled microservices. Each microservice is deployed so that it can handle the request load automatically. Automating monitoring detects and projects resource consumption. If the load is high, microservices that are under heavy load will get new instances. If the load is low, microservice instances will get reduced. Application provisioning, and therefore resource utilization, is dynamic: Only those resources that are actually needed are provisioned.

This paradigm has different names: Serverless, Functions-as-a-Service or Lambda. The first successful commercial application was Amazon Lambda, later followed by Google Cloud Functions. They offer environments in which you write functions in Java, NodeJS, Python or Go and get an HTTP endpoint for invoking functions. Today, there are many Function-as-a-Service platforms: OpenFaaS, Kubeless, Knative and Apache Camel. These platforms allow self-hosting serverless function.

OpenFaaS is easy to use, intentionally abstracting the underlying but complexity until you are ready to get into the detail. This article was intended to expand my lighthouse SaaS, but it evolved to a deep dive to explain how OpenFaaS templates work. As a first-time user, understanding the templates isn’t necessary to operate OpenFaaS, but I was curious about…


IT Project Manager & Developer