Cygnus - Self-hosted serverless for Bun and Node

4 min read Original article ↗

All of Node. None of the container tax.

Self-hosted serverless for Bun and Node. One binary, kernel-sandboxed cages, sub-100ms revival. No containers, no registry, no YAML.

Requests · node

proxy overhead · 0.4 ms p50

Revival · p99

42ms

budget ≤ 150 ms

Cages

3warm

1 asleep · disk only

atelier atelier.swan.host

84 rps · 11 ms p50

helios-api helios.dev

214 rps · 9 ms p50

prism-docs prism-docs.swan.host

cold

pulse-widget pulse-widget.swan.host

building…

Cold start · atelier

29.4 ms total · request to first user-code byte

Architecture

Full Node compatibility without giving up isolation

Namespaces and seccomp instead of a container runtime. The daemon stays in the data path so logging, metering, and rate limits are enforced centrally, not self-reported by the tenant.

client cygnus daemon cage

HTTP/1.1 · H2 · H3 over TLS per-app unix socket, keep-alive pooled

One daemon, root, in the data path

A single Rust binary terminates TLS, routes by SNI/Host with a lock-free ArcSwap, and proxies through io_uring splice. Cages hold no certs and no admin capability.

Kernel-sandboxed cages

userns, mntns, pidns, netns, cgroups v2, and a ~80-syscall seccomp allowlist. Writable mounts are noexec; the read-only artifact mount stays exec-allowed for native addons.

Egress is real networking

veth plus nftables, not a userspace proxy. Native DB drivers and raw TCP just work. RFC1918 and the metadata service are denied by default.

Everything a self-hoster needs, none of a platform's overhead

Ship three ways

Dashboard upload, a Git push that builds and previews per pull request, or cygnus deploy from the CLI. Same server-side build cage every time.

Instant rollback

Blue-green within the node. Deploys are a compare-and-swap on the active artifact; the last five stay on disk so rollback never rebuilds.

SSRF containment by default

No cloud metadata service, no cage-to-cage traffic, no RFC1918 ranges reachable from a tenant app.

Scale to zero, revive in ms

Idle apps reap after 10 minutes and cost disk only. Concurrent requests to a cold app coalesce onto one boot future.

One SQLite file is your backup

Apps, deployments, domains, encrypted env vars, and the audit log all live in one database. scp the state dir and the binaries and you have a working backup.

Revival budget

~15 to 45ms, request arrival to first user-code byte

A cage boots from a bundled artifact already sitting in the page cache, not from a pulled image. Bytecode skips the parse phase; its value scales with bundle size.

50ms p50 target, scale-from-zero 1MB bundle, published target

150ms p99 target gate: rethink the architecture past 250ms

0.5ms proxy overhead, less than io_uring splice, zero-copy in kernel

namespaces + cgroup 2 ms

mounts + seccomp 1 ms

exec + runtime init 22 ms

bytecode load vs parse 4 ms

socket ready 1 ms

total, cold start 30 ms

Where Cygnus sits between the platforms and the containers

V8-isolate platforms bought cold starts by dropping Node compatibility. Container platforms kept compatibility but pay for it in image pulls and per-container overhead. Cygnus is the honest middle: real isolation, full runtime, on hardware you own.

Capability Cygnus Vercel Coolify

Node compatibility Full, native addons included Partial on Edge, full on serverless Full

Isolation Kernel cage · ns + seccomp + cgroups V8 isolate or microVM Docker, shared kernel

Long-lived connections Yes, cages are servers Constrained on Edge Yes

Scale to zero Yes Yes No, always-on containers

Self-host the platform Yes, one binary No Yes

Deploy artifact JS + bytecode, no registry Managed build pipeline Image + compose

Installation

One command. No YAML, no registry.

The installer downloads the latest release, verifies checksums, starts the daemon, and prints your console URL plus a one-time recovery token.

  • Kernel 5.15+, systemd, root on Linux
  • No sudo on macOS, everything under ~/.cygnus
  • Re-running the installer upgrades in place

$ curl -fsSL https://cygnus.run/install.sh | sudo bash

Production install, requires root.

Self-host

Run your own serverless, on your own hardware.

AGPL-3.0. One binary. Nothing rented back to you.