SlimFaas
SlimFaas : The slimmest and simplest Function As A Service
Install / Use
/learn @SlimPlanet/SlimFaasREADME
SlimFaas: The Slimmest, Simplest & Autoscaling-First Function-as-a-Service
SlimFaas is a lightweight, plug-and-play Function-as-a-Service (FaaS) platform for Kubernetes (and Docker-Compose / Podman-Compose). It’s designed to be fast, simple, and extremely slim — with a very opinionated, autoscaling-first design:
0 → Nwake-up from HTTP history & schedules,0 → Nwake-up from Kafka lag via the companion SlimFaas Kafka service,N → Mscaling powered by PromQL,- internal metrics store, debug endpoints, and scale-to-zero out of the box.
- temporary Data Files endpoints to ingest and stage binaries (from tiny to very large) with TTL-friendly storage — perfect for caching & agentic workflows.
- temporary Data Sets endpoints (
/data/sets) to store small, Redis-like KV payloads (cache, JSON state, flags) with optional TTL — replicated through the cluster via a robust consensus layer.
Looking for MCP integration? Check out SlimFaas MCP — the companion runtime that converts any OpenAPI definition into MCP-ready tools on the fly.
Why Use SlimFaas?
🚀 Autoscaling that actually understands your traffic
-
Scale-to-zero & wake-up
- Scale down to
0after inactivity with configurable timeouts. - Wake up from
0 → Nbased on real HTTP traffic and/or cron-like schedules. - Wake up from
0 → Nbased on Kafka topic activity, using SlimFaas Kafka to monitor consumer lag and call the SlimFaas wake-up API. - Control initial capacity with
ReplicasAtStartto reduce cold-start impact.
- Scale down to
-
Two-phase scaling model
0 → N: driven by HTTP history, schedules, and Kafka lag (SlimFaas Kafka) to bring functions online only when they’re needed.N → M: driven by a built-in PromQL mini-evaluator on top of an internal metrics store.- Metrics-based autoscaling only runs when at least one pod exists — no reliance on non-existent metrics.
-
PromQL-driven autoscaler
- Express scaling rules with PromQL-style queries, for example:
sum(rate(http_server_requests_seconds_count{namespace="...",job="..."}[1m]))max_over_time(slimfaas_function_queue_ready_items{function="my-func"}[30s])histogram_quantile(0.95, sum by (le) ( rate(http_server_requests_seconds_bucket{...}[1m]) ))
- Choose whether thresholds are per pod (
AverageValue) or global (Value). - Configure scale-up/scale-down policies and stabilization windows inspired by HPA/KEDA.
- Express scaling rules with PromQL-style queries, for example:
-
Integrated metrics scraping
- SlimFaas scrapes only the Prometheus-style HTTP metrics endpoints of pods with
prometheus.io/scrape: "true". - It stores only the metric keys that are requested in autoscaling triggers or debug queries.
- A single designated node scrapes and persists metrics; all other nodes read from the same store.
- SlimFaas scrapes only the Prometheus-style HTTP metrics endpoints of pods with
-
Debug-friendly
POST /debug/promql/eval– evaluate a PromQL expression against the internal store and see the scalar result.GET /debug/store– inspect what metrics are being scraped, how many series exist, and retention size.- Designed so you can easily answer: “What does SlimFaas see when it decides to scale?”
-
FinOps-minded
- 30-minute metrics retention window for predictable memory usage.
- Native scale-to-zero and schedules to keep non-critical workloads cold when they’re not needed.
- Slim control-plane footprint to avoid burning resources in your autoscaling logic itself.
🧵 Synchronous and Asynchronous Functions
- Simple HTTP endpoints for both sync and async calls.
- Async mode:
- Limit the number of concurrent requests per function.
- Configure retry behaviors and backoff strategies.
- Drive autoscaling decisions from queue metrics.
⏱ Jobs
- Run one-off, batch, and scheduled (cron) jobs via HTTP calls.
- Configure:
- concurrency,
- visibility (public/private),
- retry behavior.
🔐 Private/Public Functions and Jobs
- Mark functions as public or private:
- Private: only accessible from within the cluster or from trusted pods.
- Public: fronted by Ingress / API Gateways as usual.
📣 Publish/Subscribe Internal Events
- Synchronously send events to every replica of selected functions.
- No additional event bus required — ideal for cluster-local fan-out, cache invalidation, configuration refresh, etc.
🧰 Data Files & Data Sets (real-time ingestion + ephemeral caching + robust KV)
SlimFaas includes two complementary “data” APIs:
📁 Data Files (temporary binary artifacts)
Data Files endpoints are designed to stream, store, and serve temporary files — from tiny payloads to very large binaries.
Ideal for agentic workflows and real-time ingestion: upload once, get an id, then let tools/functions consume it when they’re ready.
- Stream-first uploads (without buffering in memory or disk)
- Agentic-ready attachments & multi-step flows
- Ephemeral caching for intermediate artifacts
- TTL-based lifecycle (auto-expiration)
🧠 Data Sets (Redis-like KV for small state)
Data Sets endpoints provide a small, Redis-like KV store (raw bytes) replicated across the SlimFaas cluster.
- Stream-first uploads
- Store anything small: JSON, strings, flags, lightweight cache entries
- Optional
ttlin milliseconds (auto-expiration) - Hard limit: 1 MiB per value
🧠 “Mind Changer” (Status & Wake-up API)
- Built-in REST APIs to:
- monitor function and replica status,
- wake functions up on demand,
- integrate autoscaling state into your own tools/dashboards.
🔌 Plug and Play
- Deploy SlimFaas as a standard pod/StatefulSet with minimal configuration.
- Onboard existing workloads simply by adding annotations:
- let SlimFaas manage their scaling without rewriting your applications.
⚡ Slim & Fast
- Written in .NET with:
- focus on performance and low memory footprint,
- AOT-friendly design,
- minimal dependency surface.
Ready to Get Started?
Check out:
- Get Started – Learn how to deploy SlimFaas on Kubernetes or Docker Compose.
- Scaling
- Autoscaling – Deep-dive into
0 → N/N → Mautoscaling, PromQL triggers, metrics scraping, and debug endpoints. - Kafka Connector – Use Kafka topic lag to wake functions from
0 → Nand keep workers alive while messages are still flowing. - Planet Saver – See how to start and monitor replicas from a JavaScript frontend.
- Autoscaling – Deep-dive into
- Functions & Workloads
Related Skills
node-connect
340.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.2kCommit, push, and open a PR
