How to compare FaaS and Container-based Serverless offers?

In the last 20 years, few technologies have seen a more meteoric rise than Kubernetes. The container orchestration platform was initially released in 2014, and a 2019 survey by StackRox found that more than 86% of organizations have adopted it, representing a 51% increase over the previous six months. Part of the appeal is users can run Kubernetes in the cloud as well as self-managing it on-premises.

The explosive growth of containers and Kubernetes gave rise to innovative solutions like Kubeless and Knative that married the container workflow, the portability of Kubernetes, and the benefits of serverless.

The 2018 launch of Knative paved the way for a new set of fully-managed serverless offers coming online now.

We identify three essential types of serverless vendors:

  1. Function-based (FaaS)
  2. Container-based
  3. Serverless-native Applications (e.g. AWS Aurora)

For our initial purposes, we are focusing on the first two types.

Table 1: Comparison of FaaS and Container-based Serverless

  FaaS Container-based
Major vendors/offers
  • AWS Lambda
  • Azure Functions
  • Google Cloud Functions
  • AWS Fargate
  • Azure Container Instances
  • Google Cloud Run
  • Google Anthos
  • Red Hat OpenShift Serverless
Key concepts
  • Event Sources emit events for a particular service/application
  • Triggers represent what gets executed when an event happens
  • Events are the objects that contain the data and semantics about what happened
  • Functions are small units of code that get executed when events happen, they are a special kind of trigger
  • Serving provides the autoscaling – including scale to zero – a feature of FaaS as well as fine-grained traffic control using modern network gateways.
  • Eventing provides building blocks for consuming and producing events that adhere to the CloudEvents specification. 
Pros
  • Simple and fast to write and get started
  • AWS Lambda in particular been around a while and offers a high level of feature-richness and maturity
  • Any language
  • No changes to your code
  • Very portable
Cons
  • May not support your preferred language
  • May require rewriting parts of your app
  • Can lead to lock-in
  • A newer approach to serverless, still maturing feature set

Create your first event flow in under 5 minutes