{"id":41012928,"url":"https://github.com/trusch/btrfaas","last_synced_at":"2026-01-22T09:10:41.544Z","repository":{"id":57554574,"uuid":"109269012","full_name":"trusch/btrfaas","owner":"trusch","description":"btrfaas is trusch's function as a service platform","archived":false,"fork":false,"pushed_at":"2017-12-08T07:14:08.000Z","size":5715,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T05:01:54.275Z","etag":null,"topics":["cloud","faas","faas-platform","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trusch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-02T13:33:51.000Z","updated_at":"2023-09-08T17:32:03.000Z","dependencies_parsed_at":"2022-09-26T18:51:24.001Z","dependency_job_id":null,"html_url":"https://github.com/trusch/btrfaas","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/trusch/btrfaas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trusch%2Fbtrfaas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trusch%2Fbtrfaas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trusch%2Fbtrfaas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trusch%2Fbtrfaas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trusch","download_url":"https://codeload.github.com/trusch/btrfaas/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trusch%2Fbtrfaas/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28660048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud","faas","faas-platform","go"],"created_at":"2026-01-22T09:10:40.978Z","updated_at":"2026-01-22T09:10:41.533Z","avatar_url":"https://github.com/trusch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"btrfaas\n=======\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/trusch/btrfaas)](https://goreportcard.com/report/github.com/trusch/btrfaas)\n[![](https://godoc.org/github.com/trusch/btrfaas?status.svg)](http://godoc.org/github.com/trusch/btrfaas)\n\n**b**trfaas is **tr**usch's **f**unction **a**s **a** **s**ervice platform\n\n## What is this?\nBtrfaas is a framework for developing and deploying serverless applications. It provides ways to bootstrap, build and deploy functions as a basic building blocks of your next project.\n\nYou can deploy your btrfaas clusters natively on either kubernetes, docker swarm, or even locally on plain docker for development use cases. So developing and testing your functions and services locally and deploying them at scale becomes trivial.\n\n## Features\n\n* encrypted, authenticated, high performant gRPC communication\n* easy function bootstrapping\n* native templates in go, nodejs, python and bash\n* deploy anywhere: plain docker, swarm or k8s\n* simple command line client\n* function can consume options and secrets\n* native function chaining support\n* no data buffering, true streaming\n* function can be native gRPC servers or openfaas-like stdin/stdout programs\n* can run every openfaas function with minor modifications natively (swap watchdog with frunner)\n* can run every openfaas function without modifications for backward compability\n* prometheus metrics built-in\n* first level support for arbitary services like prometheus, grafana...\n* ARM and ARM64 support\n\n## Why another FaaS platform?\nI started working on this after playing a while with [OpenFaaS](https://github.com/openfaas/faas). I love this project. Its focus on developer/user experience and its simplicity are a big plus. Unfortunately I encounterd some serious problems when evaluating if openfaas would be usable in a range of edge cases coming from a big data background. Some of theses problems are:\n\n* process more data in a function call than available memory\n* efficently chain multiple functions (for memory reasons like above)\n* interrupt long running tasks cleanly\n* apply per-call timeouts\n* error handling after the first output byte has been sent (no chance to catch that in openfaas)\n\nAdditionally here are some general problems I found regarding production readyness:\n\n* Security:\n  * the openfaas gateway is not only a gateway, it also concentrates all deployment logic.\n  * to do so, it needs access to the docker socket.\n  * If you are able to hijack the gateway, you hijacked the complete system and can do whatever you want.\n  * All communication is unencrypted and unauthenticated.\n* Performance:\n  * Every function call gets dispatched by the gateway using a gorilla mux.\n  * HTTP/1.1 is used so the known limitations in terms of connection recycling etc. occurs.\n  * On function level, each function call leads to a full fork and exec cycle of the binary which does the work.\n* Maintainability\n  * although being relatively simple the codebase is distributed over many repositories\n  * there are no clear layers in the codebase. For example the create-function http handler directly includes a call to the docker swarm api. I don't know how this works together with k8s ;-)\n  * the watchdog (the binary which does the fork/exec for every function call) has a cyclomatic complexity \u003e 15, just for example\n\nAll I wanted was a version of openfaas which solves the problems above, and I hope that some of the ideas from this project will find its way back into the original openfaas codebase.\n\n## Getting Started\n```bash\n# install\ncurl -sL https://raw.githubusercontent.com/trusch/btrfaas/v0.3.3/install.sh | sh\n\n# init deployment\nbtrfaasctl init\n\n# deploy sample functions\nbtrfaasctl function deploy https://raw.githubusercontent.com/trusch/btrfaas/v0.3.3/examples/sed.yaml\nbtrfaasctl function deploy https://raw.githubusercontent.com/trusch/btrfaas/v0.3.3/examples/to-upper.yaml\n\n# test it\necho \"I hate this\" | btrfaasctl function invoke \"sed -e s/hate/love/ | to-upper\"\nI LOVE THIS\n\n# Teardown\nbtrfaasctl teardown\n```\n\n## Build your own functions\n```bash\n# bootstrap function\nbtrfaasctl function init my-echo --template go\n\n# edit ./my-echo/ to fit your needs\n\n# build and deploy\nbtrfaasctl function build my-echo\nbtrfaasctl function deploy my-echo/function.yaml\n\n# test it\necho \"Hello World\" | btrfaasctl function invoke my-echo\nHello World\n```\n\n## Full Setup\nThis will setup the complete btrfaas stack.\nThis includes:\n\n* fgateway\n* fui (simple web based UI)\n* prometheus\n* grafana\n* two sample functions: \"sed\" and \"to-upper\"\n\n```bash\n# init deployment\nbtrfaasctl init\n\n# deploy fui, prometheus and grafana\nbtrfaasctl service deploy https://raw.githubusercontent.com/trusch/btrfaas/v0.3.3/core-services/fui/fui.yaml\nbtrfaasctl service deploy https://raw.githubusercontent.com/trusch/btrfaas/v0.3.3/core-services/prometheus/prometheus.yaml\nbtrfaasctl service deploy https://raw.githubusercontent.com/trusch/btrfaas/v0.3.3/core-services/prometheus/grafana.yaml\n\n# configure grafana:\nwhile ! curl -s -H \"Content-Type: application/json\" \\\n    -XPOST http://admin:admin@localhost:3000/api/datasources \\\n    -d @- \u003c\u003cEOF\n{\n    \"name\": \"prometheus\",\n    \"type\": \"prometheus\",\n    \"access\": \"proxy\",\n    \"isDefault\": true,\n    \"url\": \"http://prometheus:9090\"\n}\nEOF\ndo sleep 1; done\n\n# deploy sample functions\nbtrfaasctl function deploy https://raw.githubusercontent.com/trusch/btrfaas/v0.3.3/examples/sed.yaml\nbtrfaasctl function deploy https://raw.githubusercontent.com/trusch/btrfaas/v0.3.3/examples/to-upper.yaml\n```\n\nYou can now visit:\n\n* fui on `http://localhost:8000`\n* prometheus on `http://localhost:9000`\n* grafana on `http://localhost:3000`\n\n## How to Contribute\nContributions are welcome, please feel free to open a PR!\nIf you find a bug or have an idea on how to improve things, open an issue.\nPR's are accepted if they follow the used coding standards, and the go-report keeps on 100%.\nIf you add end-user features, it would be great to see them integrated into the smoke tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrusch%2Fbtrfaas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrusch%2Fbtrfaas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrusch%2Fbtrfaas/lists"}