Stack

OpenFaaS stack

Layers and responsibilities

The recommended platform for deploying OpenFaaS is Kubernetes, whether that is a local environment, a self-hosted cluster, or with a managed service such as AWS Elastic Kubernetes Service (EKS).

Layers

  • OpenFaaS Cloud builds upon OpenFaaS to deliver GitOps with GitHub.com or GitLab self-hosted
  • NATS provides asynchronous execution and queuing
  • Prometheus provides metrics and enables auto-scaling through AlertManager
  • A container registry holds each immutable artifact that can be deployed on OpenFaaS via the API

The projects that make up OpenFaaS can be referred to as The PLONK Stack.

Conceptual workflow

Workflow

The Gateway can be accessed through its REST API, via the CLI or through the UI. All services or functions get a default route exposed, but custom domains can also be used for each endpoint.

Prometheus collects metrics which are available via the Gateway's API and which are used for auto-scaling.

By changing the URL for a function from /function/NAME to /async-function/NAME an invocation can be run in a queue using NATS Streaming. You can also pass an optional callback URL.

faas-netes is the most popular orchestration provider for OpenFaaS, but Docker Swarm, Hashicorp Nomad, AWS Fargate/ECS, and AWS Lambda are also available. Providers are built with the faas-provider SDK.

See also: Gateway architecture, Autoscaling, Asynchronous invocations, and Going to production