faasd is OpenFaaS reimagined, but without the cost and complexity of Kubernetes. It runs on a single host with very modest requirements, making it fast and easy to manage. Under the hood it uses containerd and Container Networking Interface (CNI) along with the same core OpenFaaS components from the main project.
- You have a cost sensitive project - run faasd on a 5-10 USD VPS or on your Raspberry Pi
- When you just need a few functions or microservices, without the cost of a cluster
- When you don't have the bandwidth to learn or manage Kubernetes
- To deploy embedded apps in IoT and edge use-cases
- To shrink-wrap applications for use with a customer or client
faasd does not create the same maintenance burden you'll find with maintaining, upgrading, and securing a Kubernetes cluster. You can deploy it and walk away, in the worst case, just deploy a new VM and deploy your functions again.
- is a single Golang binary
- uses the same core components and ecosystem of OpenFaaS
- uses containerd for a runtime and CNI for networking
- is multi-arch, so works on Intel
x86_64
and ARM out the box - can run almost any other stateful container through its
docker-compose.yaml
file
Most importantly, it's easy to manage so you can set it up and leave it alone to run your functions.
Demo of faasd running in KVM
You'll learn how to deploy code in any language, lift and shift Dockerfiles, run requests in queues, write background jobs and to integrate with databases. faasd packages the same code as OpenFaaS, so you get built-in metrics for your HTTP endpoints, a user-friendly CLI, pre-packaged functions and templates from the store and a UI.
Topics include:
- Should you deploy to a VPS or Raspberry Pi?
- Deploying your server with bash, cloud-init or terraform
- Using a private container registry
- Finding functions in the store
- Building your first function with Node.js
- Using environment variables for configuration
- Using secrets from functions, and enabling authentication tokens
- Customising templates
- Monitoring your functions with Grafana and Prometheus
- Scheduling invocations and background jobs
- Tuning timeouts, parallelism, running tasks in the background
- Adding TLS to faasd and custom domains for functions
- Self-hosting on your Raspberry Pi
- Adding a database for storage with InfluxDB and Postgresql
- Troubleshooting and logs
- CI/CD with GitHub Actions and multi-arch
- Taking things further, community and case-studies
View sample pages, reviews and testimonials on Gumroad:
"Serverless For Everyone Else"
faasd is OpenFaaS, so many things you read in the docs or in blog posts will work the same way.
Use-cases and tutorials:
- Deploy via GitHub Actions
- Scrape and automate websites with Puppeteer
- Serverless Node.js that you can run anywhere
- Build a Flask microservice with OpenFaaS
Additional resources:
- For reference: OpenFaaS docs
- For use-cases and tutorials: OpenFaaS blog
- For self-paced learning: OpenFaaS workshop
The easiest way to deploy faasd is with cloud-init, we give several examples below, and post IaaS platforms will accept "user-data" pasted into their UI, or via their API.
For trying out fasad on MacOS or Windows, we recommend using multipass.
If you don't use cloud-init, or have already created your Linux server you can use the installation script as per below:
git clone https://github.com/openfaas/faasd --depth=1
cd faasd
./hack/install.sh
This approach also works for Raspberry Pi
It's recommended that you do not install Docker on the same host as faasd, since 1) they may both use different versions of containerd and 2) docker's networking rules can disrupt faasd's networking. When using faasd - make your faasd server a faasd server, and build container image on your laptop or in a CI pipeline.
The terraform can be adapted for any IaaS provider:
See also: Build a Serverless appliance with faasd and cloud-init
You can run this tutorial on your Raspberry Pi, or adapt the steps for a regular Linux VM/VPS host.
Automate everything within < 60 seconds and get a public URL and IP address back. Customise as required, or adapt to your preferred cloud such as AWS EC2.
You can view the logs of functions using journalctl
:
journalctl -t openfaas-fn:FUNCTION_NAME
faas-cli store deploy figlet
journalctl -t openfaas-fn:figlet -f &
echo logs | faas-cli invoke figlet
- faasd - itself, and its faas-provider for containerd - CRUD for functions and services, implements the OpenFaaS REST API
- Prometheus - for monitoring of services, metrics, scaling and dashboards
- OpenFaaS Gateway - the UI portal, CLI, and other OpenFaaS tooling can talk to this.
- OpenFaaS queue-worker for NATS - run your invocations in the background without adding any code. See also: asynchronous invocations
- NATS for asynchronous processing and queues
You'll also need:
You can use the standard faas-cli along with pre-packaged functions from the Function Store, or build your own using any OpenFaaS template.
See here for manual / developer instructions
"Serverless For Everyone Else" is the complete guide and documentation for faasd. If you're looking for how to do something, it's likely that the book covers it.
The OpenFaaS docs provide a wealth of information for OpenFaaS on Kubernetes, and are likely to be useful for you, even using faasd.
For community functions see faas-cli store --help
For templates built by the community see: faas-cli template store list
, you can also use the dockerfile
template if you just want to migrate an existing service without the benefits of using a template.
The founder of faasd and OpenFaaS has written a training course for the LinuxFoundation which also covers how to use OpenFaaS on Kubernetes. Much of the same concepts can be applied to faasd, and the course is free:
The OpenFaaS workshop is a set of 12 self-paced labs and provides a great starting point for learning the features of openfaas. Not all features will be available or usable with faasd.
Commercial users and solo business owners should become OpenFaaS GitHub Sponsors to receive regular email updates on changes, tutorials and new features.
If you are learning faasd, or want to share your use-case, you can join the OpenFaaS Slack community.
For completed features, WIP and upcoming roadmap see:
See ROADMAP.md