MCPcopy
hub / github.com/openfaas/faasd

github.com/openfaas/faasd @0.19.7 sqlite

repository ↗ · DeepWiki ↗ · release 0.19.7 ↗
216 symbols 743 edges 50 files 61 documented · 28%
README

faasd - a lightweight and portable version of OpenFaaS

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.

faasd logo

Features & Benefits

  • Lightweight - faasd is a single Go binary, which runs as a systemd service making it easy to manage
  • Portable - it runs on any Linux host with containerd and CNI, on as little as 2x vCPU and 2GB RAM - x86_64 and Arm64 supported
  • Easy to manage - unlike Kubernetes, its API is stable and requires little maintenance
  • Low cost - it's licensed per installation, so you can invoke your functions as much as you need, without additional cost
  • Stateful containers - faasd supports stateful containers with persistent volumes such as PostgreSQL, Grafana, Prometheus, etc
  • Built on OpenFaaS - uses the same containers that power OpenFaaS on Kubernetes for the Gateway, Queue-Worker, Event Connectors, Dashboards, Scale To Zero, etc
  • Ideal for internal business use - use it to build internal tools, automate tasks, and integrate with existing systems
  • Deploy it for a customer - package your functions along with OpenFaaS Edge into a VM image, and deploy it to your customers to run in their own datacenters

faasd does not create the same maintenance burden you'll find with installing, 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.

You can learn more about supported OpenFaaS features in the ROADMAP.md

Getting Started

There are two versions of faasd:

  • faasd CE - for non-commercial, personal use only licensed under the faasd CE EULA
  • OpenFaaS Edge (faasd-pro) - fully licensed for commercial use

You can install either edition using the instructions in the OpenFaaS docs.

You can request a license for OpenFaaS Edge using this form

Further resources

There are many blog posts and documentation pages about OpenFaaS on Kubernetes, which also apply to faasd.

Videos and overviews:

Use-cases and tutorials:

Additional resources:

Deployment tutorials

Terraform scripts:

Training / Handbook

You can find various resources to learn about faasd for free, however the official handbook is the most comprehensive guide to getting started with faasd and OpenFaaS.

"Serverless For Everyone Else" is the official handbook and was written to contribute funds towards the upkeep and maintenance of the project.

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"

Extension points exported contracts — how you extend this code

Resolver (Interface)
Resolver resolves an upstream IP address for a given upstream host [2 implementers]
pkg/resolver.go
Labeller (Interface)
Labeller can return labels for a namespace from containerd. [1 implementers]
pkg/provider/labeller.go
ArchGetter (FuncType)
ArchGetter provides client CPU architecture and client OS
pkg/supervisor.go

Core symbols most depended-on inside this repo

Error
called by 140
pkg/provider/handlers/mutate_namespaces.go
Close
called by 24
pkg/supervisor.go
httpHeaderMiddleware
called by 13
cmd/provider.go
Contains
called by 11
pkg/depgraph/depgraph.go
Add
called by 10
pkg/depgraph/depgraph.go
Remove
called by 8
pkg/depgraph/depgraph.go
getRequestNamespace
called by 8
pkg/provider/handlers/utils.go
validNamespace
called by 8
pkg/provider/handlers/utils.go

Shape

Function 171
Method 24
Struct 18
Interface 2
FuncType 1

Languages

Go100%

Modules by API surface

pkg/supervisor.go17 symbols
pkg/provider/handlers/deploy.go11 symbols
pkg/cninetwork/cni_network.go11 symbols
pkg/provider/handlers/mutate_namespaces.go10 symbols
pkg/depgraph/depgraph.go9 symbols
cmd/up.go9 symbols
pkg/provider/handlers/secret.go7 symbols
pkg/provider/config/read_test.go7 symbols
pkg/logs/requestor.go7 symbols
pkg/deployment_order_test.go7 symbols
cmd/root.go7 symbols
pkg/provider/handlers/function_test.go6 symbols

Dependencies from manifests, versioned

github.com/AdaLogics/go-fuzz-headersv0.0.0-2023081113042 · 1×
github.com/AdamKorcz/go-118-fuzz-buildv0.0.0-2023030612354 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×
github.com/Microsoft/hcsshimv0.11.7 · 1×
github.com/alexellis/arkadev0.0.0-2024032008440 · 1×
github.com/alexellis/go-execute/v2v2.2.1 · 1×
github.com/beorn7/perksv1.0.1 · 1×
github.com/cespare/xxhash/v2v2.2.0 · 1×
github.com/compose-spec/compose-gov0.0.0-2020052804232 · 1×
github.com/containerd/cgroupsv1.1.0 · 1×

For agents

$ claude mcp add faasd \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact