Skip to content

SlimPlanet/SlimFaas

SlimFaas

SlimFaas: The Slimmest, Simplest & Autoscaling-First Function-as-a-Service

Continuous Integration Quality Gate Reliability Security Code Coverage Docker SlimFaas Docker Image Size Docker Image Version Artifact Hub FOSSA Status FOSSA Status OpenSSF Scorecard OpenSSF Best Practices

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 → N wake-up from HTTP history & schedules,
  • 0 → N wake-up from Kafka lag via the companion SlimFaas Kafka service,
  • N → M scaling powered by PromQL,
  • internal metrics store, debug endpoints, and scale-to-zero out of the box.

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 0 after inactivity with configurable timeouts.
    • Wake up from 0 → N based on real HTTP traffic and/or cron-like schedules.
    • Wake up from 0 → N based on Kafka topic activity, using SlimFaas Kafka to monitor consumer lag and call the SlimFaas wake-up API.
    • Control initial capacity with ReplicasAtStart to reduce cold-start impact.
  • 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.
  • 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.
  • 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.

🧠 “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.
SlimFaas CPU RAM

Ready to Get Started?

Check out:

  • Get Started – Learn how to deploy SlimFaas on Kubernetes or Docker Compose.
  • Autoscaling – Deep-dive into 0 → N / N → M autoscaling, PromQL triggers, metrics scraping, and debug endpoints.
  • Kafka Connector – Use Kafka topic lag to wake functions from 0 → N and keep workers alive while messages are still flowing.
  • Functions – See how to call functions synchronously or asynchronously.
  • Events – Explore how to use internal synchronous publish/subscribe events.
  • Jobs – Learn how to define and run one-off jobs.
  • How It Works – Dive into SlimFaas’s architecture and design.
  • Planet Saver – See how to start and monitor replicas from a JavaScript frontend.
  • MCP – Discover how to convert any OpenAPI definition into MCP-ready tools on the fly.

We hope SlimFaas helps you simplify autoscaling, reduce costs, and keep your serverless workloads slim.


Community & Governance

Enjoy SlimFaas!


Adopters

List of organizations using this project in production or at stages of testing.

AXA

Add your logo via a pull request:

  • Logo must be at PNG format, 100 px width, and 100 px height.
  • Add your logo to the documentation/adopters folder.