“All problems in computer science can be solved by another level of indirection.” — David Wheeler

The first parts of the series have given you a taste of what serverless computing is and the use cases it enables, along with its benefits and drawbacks.

Armed with this knowledge, you might be planning to give serverless a try before attempting to migrate all your applications to this new architecture. As you start googling around, you quickly realize there are tens of FaaS platforms, each promising unique capabilities. As confusion settles in your mind and you start getting tired of all the boastful claims made by FaaS providers, one question makes its way to the forefront of your mind:

Which one should you choose?

In this post, we will navigate the tangled ecosystem of FaaS offerings, both managed and open-source, and determine their main capabilities and key differentiating features. The goal is to be able to make an informed choice depending on your requirements and use cases.

Managed FaaS platforms

If you are looking for the full serverless experience, a managed platform is the way to go. All the operational issues are handled by the provider and managed platforms are generally more stable while offering better performance than their open-source counterparts. They integrate with the ecosystem of the cloud provider and provide fine-grained security, compliance, and an availability SLA out-of-the-box. However, it does come with a price: taking advantage of all these features will very quickly get you vendor-locked, so plan carefully.

AWS Lambda

Description: AWS Lambda is the first FaaS platform, launched back in 2014. It is also the most popular, owning 70% of the market share, according to a CNCF survey. For good reason, as it is considered to be the most stable platform and has been demonstrated to be one of the most scalable platforms, and with some of the lowest coldstart latencies. Lambda benefits from being part of the excellent Amazon Web Services ecosystem, and is well integrated with many AWS managed services, which can serve as event sources (S3, Kinesis, DynamoDB, Alexa, etc.). Lambda can be deployed at the edge via the Lambda@Edge service (e.g. integrating with CloudFront, a CDN offering from Amazon, and helping to serve requests as close to the clients as possible) and workflows can be created using AWS Step Functions.

General features:

  • Event sources: Amazon S3, Amazon DynamoDB, Amazon Kinesis Data Streams, Amazon Simple Notification Service, Amazon Simple Email Service, Amazon Simple Queue Service, Amazon Cognito, AWS CloudFormation, Amazon CloudWatch Logs, Amazon CloudWatch Events, AWS CodeCommit, Scheduled Events (powered by Amazon CloudWatch Events), AWS Config, Amazon Alexa, Amazon Lex, Amazon API Gateway, AWS IoT Button, Amazon CloudFront, Amazon Kinesis Data Firehose, On-demand invocation (over HTTP)
  • Supported languages: Node.JS, Python, Java, C#, Go, custom runtimes through Lambda Layers
  • Price: $0.20 per 1 million invocations and $0.00001667 per GB-second
  • Memory for a function can be adjusted in 64MB increments from 128MB to 3GB; CPU automatically scales with memory
  • Function timeout: 900s
  • Temporary disk space: 512MB
  • Maximum concurrent invocations per region (can be increased on request): 1000

Differentiating features:

Azure Functions

Description: Azure Functions is Microsoft’s take on FaaS and the second most popular platform on the market. Launched in 2016, it is an open-source product and is well integrated in the Azure Cloud ecosystem. Its scaling capabilities when using the standard plan are weaker than AWS Lambda as evidenced by studies like this one and this one. However, Azure Functions V2.0 became generally available almost a year ago and promises improved performance, stability, and development capabilities. The new platform can run anywhere, including on Kubernetes or locally in Mac and Linux environments, features native integration with Visual Studio and VS Code, and can run on IoT devices. Azure Functions provides different capabilities depending on the plan you are using. Consumption is the default FaaS plan, and the features listed below are specific to this plan. If you are willing to pay more, Premium comes with unlimited function timeouts (30 min by default), more CPU and RAM, and a way to mitigate cold starts using pre-warmed workers (beware, those workers run 24/7 and you will be charged for them even when they are not used!). Finally, you can also run functions in conventional VMs, with the App Service plan.

General features:

  • Event sources: Azure Cosmos DB, Azure Event Hubs, Azure Event Grid, Azure Notification Hubs, Azure Service Bus (queues and topics), Azure Storage (blob, queues, and tables), On-premises (using Service Bus), Twilio (SMS messages)
  • Supported languages: C#, F#, JavaScript, TypeScript, Java, with Python and PowerShell in preview
  • Price: $0.20 per 1 million invocations and $0.000016 per GB-second
  • Function memory is fixed at 1.5GB
  • Function timeout: 300s (default, can be increased to a maximum of 600s)
  • Temporary disk space: 500MB
  • Maximum concurrent invocations per function app (fixed): 200, a new function instance can be created every 1s for HTTP events and every 30s for non-HTTP events

Differentiating features:

Google Cloud Functions

Description: Google Cloud Functions is a FaaS platform from Google that became generally available almost a year ago. It is very similar in capabilities to AWS Lambda and Azure Functions; performance-wise it seems to be between the two, outperforming Azure Functions but being outperformed by Lambda. In the past, some studies have shown that Google Cloud Functions sometimes failed to scale at the desired rate even for a low concurrency level. Overall, it is a simpler implementation with a strong core of critical functionality, but with limited language support and lacking some of the more sophisticated features available in the other managed platforms such as native support for scheduled functions (cron jobs).

General features:

  • Event sources: HTTP — invoke functions directly via HTTP requests, Cloud Storage, Cloud Pub/Sub, 
    Firebase (DB, Storage, Analytics, Auth), Stackdriver Logging
  • Supported languages: Node.JS, Python, Go
  • Price: $0.40 per 1 million invocations, $0.0000025 per GB-second and $0.0000100 per GHz-second
  • Memory for a function can be adjusted in increments from 128MB to 2GB; CPU automatically scales with memory
  • Function timeout: 540s
  • Temporary disk space: Yes, tmpfs volume that consumes memory
  • Maximum concurrent invocations per background function (no limit for HTTP triggered functions): 1000

Differentiating features:

IBM Cloud Functions

Description: IBM Cloud Functions is a FaaS platform from IBM, leveraging the open-source OpenWhisk that they donated to the Apache foundation in 2016. As a managed platform, it is not as popular as Lambda, Azure Functions, and Google Cloud Functions but is a solid platform with open-source roots.

General features:

  • Event sources: HTTP — invoke functions directly via HTTP requests, Github, Cloudant, IBM Message Hub, Mobile Push, Slack, Watson, Cloudant, Weather, Websockets, any event source implementing the open event provider interface
  • Supported languages: NodeJS, Swift, Java, Go, PHP, Python, Any language (via Docker containers)
  • Price: $0.000017 GB-s
  • Memory for a function can be adjusted in increments from 128MB to 2GB; CPU automatically scales with memory
  • Function timeout: 600s
  • Maximum concurrent invocations per function (can be increased on request): 1000

Differentiating features:

  • Uses same code base as open-source version that can be deployed on-premise
  • Can be run and tested locally
  • Availability SLA: 99.95% Monthly Uptime Percentage
  • Support for any programming language through Docker containers
  • Open event provider interface, allowing for any service implementing the interface to be used as an event source
  • Build workflows using Composer

Open-source FaaS platforms

If you need more control over your FaaS platform, open-source is the way to go. You have access to the codebase and can easily deploy your platform of choice on-premises or in the public cloud. Open-source FaaS platforms are generally not as polished as their managed counterparts but they are much easier to extend and tailor to your needs. One important thing to remember is that, generally speaking, you will be responsible for the operational side of the platform, negating some of the benefits of the serverless experience (many open-source providers do offer managed plans, e.g. Platform9 offers managed Fission and Iguazio offers managed Nuclio).

Fission

Description: Fission is an open-source FaaS platform that runs natively on Kubernetes. It is written in Go and is a popular project among the open-source FaaS community. Fission makes use of Kubernetes for most of its internal functionality but also adds its own logic to achieve better performance (e.g. keeping around a pool of warm containers for fast coldstarts). Autoscaling is implemented based on CPU usage with plans of adding custom metrics in the future and Prometheus metrics are automatically exposed to help with monitoring.

General features:

  • Event sources: HTTP, Time Triggers, NATS, Azure Storage Queue, Webhooks (e.g. Github, Slack), Kubernetes Event Handlers
  • Supported languages: Python, NodeJS, Go, C#, PHP, can be extended to any language

Differentiating features:

  • Support for workflows using Fission Workflows
  • Fast cold-starts using pool of warm containers
  • Live-reload for functions in test environments
  • Can replay function invocations
  • Fully automated canary deployments

OpenWhisk

Description: OpenWhisk is a popular open-source FaaS project donated by IBM to the Apache foundation. It is one of the most stable open-source FaaS platforms, due to extensive production use by IBM on their cloud and Red Hat on Openshift. IBM Cloud Functions is based on the same codebase, therefore most of the features are the same, with the exception of integration with IBM Cloud managed services (e.g. for logging and monitoring). However, OpenWhisk can make use of other open-source projects such as Composer for defining workflows and Shell as a lightweight development environment.

General features:

  • Event sources: HTTP — invoke functions directly via HTTP requests, Github, Cloudant, IBM Message Hub, Mobile Push, Slack, Watson, Cloudant, Weather, Websockets, any event source implementing the open event provider interface
  • Supported languages: NodeJS, Swift, Java, Go, PHP, Python, Any language (via Docker containers)

Differentiating features:

  • Support for any programming language through Docker containers
  • Open event provider interface, allowing for any service implementing the interface to be used as an event source
  • Build workflows using Composer
  • Development tools through Shell

Kubeless

Description: Kubeless is an open-source FaaS platform built natively on Kubernetes using CRDs (Custom Resource Definitions). Kubeless is 100% Kubernetes-native, all its internal functionality (auto-scaling, API routing, monitoring, etc.) is enabled through Kubernetes; before the release of Knative, it was the most popular Kubernetes-based FaaS platform. Autoscaling is done through Kubernetes’ HPA (Horizontal Pod Autoscaler) and Prometheus monitoring is enabled by default.

General features:

  • Event sources: HTTP, CronJob, Kafka, NATS, can be extended through CRDs
  • Supported languages: Python, Node.js, Ruby, PHP, Golang, .NET, Ballerina and custom runtimes

Differentiating features:

  • CLI-compliant with AWS Lambda

Nuclio

Description: Nuclio is an open-source FaaS platform aimed at real-time and data-driven applications. It claims to have the fastest platform, reaching up to 400.000 invocations/second. It offers a variety of integrations with event and data sources, along with support for Prometheus for monitoring and Azure Application Insights for metrics and logging. Nuclio is one of the first open-source FaaS platforms to start specializing, with a strong focus on data science. It is the first FaaS platform to support GPU processing and, in the provider-managed version, it provides tight integrations with machine learning tools, such as Spark, TensorFlow, and Jupyter notebooks.

General features:

  • Event sources: HTTP, NATS, Kafka, Kinesis, RabbitMQ, Iguazio v3io, Azure Event Hub, cron (locally invoked)
  • Supported languages: Go, Python, .NET core, PyPy, Shell (invoke binary or script via exec), V8 (JavaScript and Node.JS), Java

Differentiating features:

  • Can be deployed on-premise, multi-cloud or on low power devices
  • Designed for low latency applications (high performance)
  • Support for GPU processing
  • Tight integrations with machine learning tools, such as Spark, TensorFlow, and Jupyter notebooks

Knative

Knative is a project built by Google in collaboration with partners such as IBM, Pivotal, SAP and RedHat. It is a set of building blocks on top of Kubernetes as the container orchestrator and Istio as the service mesh. Knative can power the back-end of a custom FaaS platform or can be used independently to automate operations. There are three loosely-coupled components: Build (cloud-native source to container build orchestration), Eventing (delivery and management of events), and Serving (scale to zero, request-driven compute model). Knative is benefiting from a surge in popularity (partly due to being backed by Google). Some of the other open-source FaaS platforms are now backed by Knative, such as Pivotal’s Riff. Others are interoperable with Knative, such as OpenFaaS.

Differentiating features:

  • High-level abstraction over Kubernetes providing FaaS-like functionality
  • Collection of loosely coupled components that can be used together or independently
  • Platform-agnostic, multi-cloud, on-premise deployment

Others

There are many other FaaS platforms out there, each with their own selling points: Fn Project (open-source, from Oracle), OpenFaaS, OpenLambda (academic, built mostly for experimentation purposes), Galactic Fog, Riff(built on top of Knative), Twilio Functions, Spotinst Functions, etc. Recently, Microsoft announced KEDA, their open-source alternative to Knative Serving. There are also platform-agnostic serverless frameworks, the most popular of which is Serverless Framework. This article would stretch forever if an attempt would be made to cover them all, but I am hoping that this selection is relevant for everyone and provides a decent sample of the ecosystem.

Conclusion

The serverless ecosystem is booming, with tens of FaaS platforms available and a variety of managed services that can integrate with them. It is still early, and many of these projects will get filtered out as the market matures, but you can rest assured knowing that, no matter your requirements, there is a FaaS platform out there that can address them. Whether you want a managed platform that gives you faster time-to-market and fully-managed infrastructure or an open-source one that you fully control, the choice is yours to make. My hope is that this article helped you get a better overview of what is available out there.

In the next article, we will look at serverless from a developer’s point of view; we will discuss the change in perspective that is required for this new paradigm and examine what tooling is available.