-
Alex Ellis authoredAlex Ellis authored
Functions as a Service (FaaS)
FaaS is a framework for building serverless functions with Docker which has first class support for metrics. Any process can be packaged as a function enabling you to consume a range of web events without repetitive boiler-plate coding.
Highlights
- Ease of use through UI portal and one-click install
- Write functions in any language for Linux or Windows and package in Docker/OCI image format
- Portable - runs on existing hardware or public/private cloud - Kubernetes or Docker Swarm
- CLI available with YAML format for templating and defining functions
- Auto-scales as demand increases
Overview of FaaS
Function Watchdog
- You can make any Docker image into a serverless function by adding the Function Watchdog (a tiny Golang HTTP server)
- The Function Watchdog is the entrypoint allowing HTTP requests to be forwarded to the target process via STDIN. The response is sent back to the caller by writing to STDOUT from your application.
Gateway
- The API Gateway provides an external route into your functions and collects Cloud Native metrics through Prometheus.
- Your API Gateway will scale functions according to demand by altering the service replica count in the Docker Swarm or Kubernetes API.
- A UI is baked in allowing you to invoke functions in your browser and create new ones as needed.
CLI
Any container or process in a Docker container can be a serverless function in FaaS. Using the FaaS CLI you can deploy your functions or quickly create new functions from templates such as Node.js or Python.
Notable mentions
Closing Keynote at Dockercon 2017
Functions as a Service or FaaS was a winner in the Cool Hacks contest for Dockercon 2017.
If you'd like to find the functions I used in the demos head over to the faas-dockercon repository.
InfoWorld
Serdar Yegulalp Senior Technical Writer covered FaaS in a write-up looking at serverless in the open-source world:
Open source project uses Docker for serverless computing
Online community
There is also a community being built around FaaS with talks, demos and sample functions being built out.
Find out about community activity
Getting started
Test Drive FaaS
You can TestDrive FaaS on your laptop in 60 seconds, or deploy to a free online Docker playground. Find out more in the TestDrive.
You can dive straight into the sample functions here. You'll find hello-world examples for the most common programming languages including: Golang, DotNet Core, Java, NodeJS, Python even BusyBox.
There is even CLI called faas-cli which lets you speed up development by creating functions from templates for Node.js or Python. You can also use the CLI to deploy to your own FaaS API Gateway with a single command.
Contribute to FaaS
FaaS enables you to run your serverless functions in whatever language you like, wherever you like - for however long you need.
Contributions to the project are welcome - please send in issues and questions through Github.