Deploy like microservices. Perform like a monolith. Evolve like a living organism. A Kubernetes-native runtime for zero-copy function composition.
curl -sf https://kubefn.com/install.sh | sh
hey, 1000 req, 10 concurrent.
Deploy 4 functions. Watch them share memory. Process a request in microseconds.
Every platform before KubeFn forces you to pick two. KubeFn gives you all three.
✓ Shared memory ✗ Independent deploy ✗ Hot-swap
✗ Shared memory ✓ Independent deploy ✗ Hot-swap
✗ Shared memory ✓ Independent deploy ✗ Hot-swap
✓ Shared memory ✓ Independent deploy ✓ Hot-swap
Zero-copy shared object graph between functions. No serialization. No network. Same memory address. Function A's output IS Function B's input.
New function revisions enter an already-hot JVM. Shared libraries are JIT-compiled. Peak performance in <1 second, not 30+ seconds.
Replace individual functions while traffic flows. Zero dropped requests. The organism lives — only the organ is replaced. Tested: 200/200 successful.
Compose functions into in-memory execution graphs. The runtime owns the graph, traces it, and can optimize it. 7 steps in 0.458ms.
Per-function failure isolation. If one function fails, the breaker trips — protecting the shared organism from cascade failures.
OpenTelemetry spans per function with revision IDs, request lineage, and heap mutation tracking. See exactly what happened in memory.
Memory-Continuous Architecture isn't language-specific.
Same shared-memory concept. Different runtimes.
Every sidecar, init container, cron job, and queue worker in Kubernetes is a container that doesn't need to exist. KubeFn runs them all as functions in a single warm JVM — zero cold starts, zero container builds.
@FnSchedule(cron = "0 0/15 * * *") — runs in the warm JVM.
@FnSchedule(cron = "0 0/15 * * *") @FnRoute(path = "/cleanup") public class SessionCleanup implements KubeFnHandler { // Runs on schedule AND via HTTP. Shared heap access. }
@FnQueue(topic = "orders") — consumes in-process, zero-copy.
@FnQueue(topic = "orders", concurrency = 4) public class OrderProcessor implements KubeFnHandler { // Consumes from queue. DLQ on failure. Shared heap. }
@FnLifecyclePhase(phase = INIT) — runs in the warm organism.
Also: API aggregation, rate limiters, feature flags, audit trails, ETL stages, stream processors, saga coordinators, notification dispatchers, data validators, health monitors, retry handlers, protocol translators, rules engines, logging pipelines, metric aggregators...
Compile-time safe. IDE autocomplete. No string typos. No type mismatches.
// Define typed keys in your contracts module public final class HeapKeys { public static final HeapKey<PricingResult> PRICING = HeapKey.of("pricing:current", PricingResult.class); } // Use in functions — wrong type won't compile PricingResult pricing = ctx.heap().require(HeapKeys.PRICING); ctx.heap().publish(HeapKeys.TAX, taxResult);
Install the CLI, scaffold a function, deploy.
# Install CLI brew tap kubefn/tap && brew install kubefn # Or: curl -sf https://kubefn.com/install.sh | sh # Scaffold a function kubefn init pricing-engine checkout-service # Add dependency (Maven Central — no extra repos needed) compileOnly("com.kubefn:kubefn-api:0.3.1") # Start local runtime with hot-reload kubefn dev # Deploy to Kubernetes helm install kubefn kubefn/kubefn
Same HeapExchange. Same FnGraph. Same hot-swap. Zero infrastructure.
# Install from ClawHub or pip pip install kubefn-lite # Deploy a function engine.deploy( name="pricing", source_code='def handler(input): return {"price": input["qty"] * 9.99}', entry_point="handler" ) # Compose a pipeline — shared memory, zero serialization result = engine.run_graph({ "stages": [{"function": "pricing"}, {"function": "tax"}] }) # Hot-swap live — no restart engine.hot_swap("pricing", new_source_code)
GitHub · 20 tests passing · Python + Node.js + JVM · Ready for production? → Deploy on Kubernetes
Functions are independently deployable but collaborate through shared heap objects.
// Zero-copy: publish once, read everywhere @FnRoute(path = "/pricing") @FnGroup("checkout") public class PricingFunction implements KubeFnHandler { public KubeFnResponse handle(KubeFnRequest req) { // Read from HeapExchange — SAME object, zero copy var auth = ctx.heap().get("auth", Map.class); var price = Map.of("total", 84.99); ctx.heap().publish("price", price, Map.class); return KubeFnResponse.ok(price); } }
Replace a function while 200 requests are in flight. Zero downtime.
The dominant abstraction in serverless composition conflates deployment isolation with data representation boundaries. This paper introduces Memory-Continuous Architecture — a runtime model that decouples these concerns, enabling independently deployable functions to share in-memory object graphs with zero serialization.