Deployment Topologies
Reactor ships as a single Rust workspace with one unified HTTP surface. How you run it is described by three independent axes:
- Edition — who operates it and under what license (
O/C/E) - Size — how decomposed the topology is (
1–6,10+) - Platform — where it runs (
@fly,@aws, …)
Combine them into a single token: <Edition><Size>@<platform> — for example O2, C6@fly, E5@aws.
Edition
Section titled “Edition”| Code | Edition | Who operates it |
|---|---|---|
O | Open Source | You — self-hosted, no license |
C | Commercial Cloud | We operate it (managed Reactor.cloud) |
E | Enterprise | The customer operates it, under license |
Size describes topology decomposition, not raw capacity. Each rung externalizes one more component.
| Size | Name | Layout |
|---|---|---|
1 | Local | One process, embedded Postgres + vault, 127.0.0.1 only |
2 | Single node | One box: all capabilities + Postgres + OpenBao co-located, TLS via reverse proxy |
3 | External DB | App node(s) + managed/external Postgres; vault still embedded |
4 | Shared infra | External DB + one infra node (NATS + OpenBao + gateway co-located) |
5 | Dedicated gateway | External DB + standalone gateway/edge tier; NATS + OpenBao still combined |
6 | Decomposed | Every component independent: NATS, OpenBao, gateway, pooler, app pool |
10+ | Elastic | Autoscaling pools, multi-region, HA — use +ha, +mr, +as modifiers |
Platform
Section titled “Platform”| Tag | Target |
|---|---|
@local | Laptop / developer machine |
@fly | Fly.io |
@aws | Amazon Web Services |
@azure | Microsoft Azure |
@gcp | Google Cloud |
@onprem | Customer datacenter / bare metal |
Modifiers append to the size: +ha (DB/secret HA), +mr (multi-region), +as (autoscale). Example: C5+ha@fly.
flowchart LR S1[1 Local] --> S2[2 Single node] S2 --> S3[3 External DB] S3 --> S4[4 Shared infra] S4 --> S5[5 Dedicated gateway] S5 --> S6[6 Decomposed]Size 1 — Local
Section titled “Size 1 — Local”Reactor Studio embeds reactor-server as a library inside a Tauri desktop shell. One process, one Postgres (local or Docker), bind address 127.0.0.1 only. Typically O1@local.
Characteristics:
- All capabilities composed in-process via
InProcessAuthClient— no inter-service HTTP - Cargo feature
g1-tauritrims heavy adapters (AWS Lambda, Bun warm pool) - Binary size budget: ≤ 30 MB stripped
- TLS termination handled by the desktop shell or not at all (localhost only)
- Day-to-day development with Reactor Studio
- Prototyping without cloud spend
- Demos and offline environments
- AI agent workflows that need local filesystem + shell access
- Production traffic (use size 2+)
- Team-wide shared environments
- Anything requiring public HTTPS endpoints
# Reactor.toml — size 1 (local) minimal[project]name = "my-app"id = "proj_dev_local"
[server]bind = "127.0.0.1:8000"
[database]url = "postgres://reactor:reactor@127.0.0.1:5432/reactor"
[admin]token = "dev-admin-token"allow_remote = false
[auth]data_key = "base64-encoded-32-byte-key"public_url = "http://127.0.0.1:8000"Size 2 — Single node
Section titled “Size 2 — Single node”The production sweet spot for self-hosters. One reactor-server binary runs every enabled capability against one Postgres and one filesystem, with OpenBao (or embedded vault) on the same box. Put Caddy or nginx in front for TLS. Typically O2 or E2.
Characteristics:
- Full capability bundle via
g2-fullCargo features (auth, data, storage, functions, jobs, sites) - Boot target: listening in under 1 second
- Admin surface at
/_admin/*for deploy, doctor, logs - Background tasks (job scheduler, signed-URL janitor, Bun warm pool) managed by the unified binary
- Self-hosted production for a single project
- Fly.io, Hetzner, DigitalOcean single-machine deploys
- Teams that want full control without Kubernetes
| Workload | CPU | RAM | Storage |
|---|---|---|---|
| Dev/staging | 1 vCPU | 1 GB | 10 GB |
| Small prod | 2 vCPU | 4 GB | 50 GB |
| Active prod | 4 vCPU | 8 GB | 100 GB+ |
# Typical size 2 stackdocker compose up -d # postgres + reactor-servercaddy reverse-proxy :443 # TLS terminationreactor deploy # push bundle via /_admin/deploySee Self-hosting for Docker, Compose, and Fly.io walkthroughs.
Sizes 3–6 — Decomposed
Section titled “Sizes 3–6 — Decomposed”When you need independent scaling, blast-radius isolation, or managed multi-tenancy, externalize components one rung at a time. Each capability can run as its own binary (reactor-auth-server, reactor-data-server, …) mounting the same router as the unified binary — the HTTP contract is byte-identical.
Characteristics:
- Scale functions workers separately from the data API
- Run wasmtime in its own address space (functions isolation)
- Swap storage backend to S3 without touching auth
- Microservices auth mode: capabilities call
reactor-auth-serverover HTTP
App server(s) + managed/external Postgres (Neon, RDS, Supabase). Vault stays embedded or env-injected. First externalization step.
External DB + one infra node co-locating NATS, OpenBao, and the gateway. Cheapest decomposed option.
Gateway/edge broken out as its own tier; NATS + OpenBao still combined. App pool scales behind the gateway. (Today’s *5@fly reference topology.)
Every component independent — separate NATS, OpenBao, gateway, connection pooler, and app pool. Control plane routes per project. This is what reactor cloud create provisions. (Today’s *6@fly reference topology.)
C6@fly — Commercial shared cluster
Section titled “C6@fly — Commercial shared cluster”The managed tier. Stateless reactor-shared instances front a shared PostgreSQL cluster (one database per project: tenant_<ref>), NATS JetStream for realtime, Supavisor for connection pooling, and OpenBao for secrets — a size 6 decomposed topology that we operate (edition C).
Characteristics:
- Host-based routing:
{project_ref}.reactor.cloud - Per-tier quotas (requests/min, storage, bandwidth)
- Control plane handles provisioning, deploy queue, domain verification
- No infrastructure to operate —
reactor cloud createandreactor deploy --context cloud
| Resource | Free tier limit |
|---|---|
| Requests/minute | 1,000 |
| Concurrent functions | 10 |
| Database connections | 5 |
| Storage | 1 GB |
| Bandwidth/month | 5 GB |
# C6@fly workflowreactor cloud loginreactor cloud create my-saas --region iadreactor deploy --context cloud --project my-saasreactor cloud logs my-saas --followChoosing a deployment
Section titled “Choosing a deployment”| Question | O1 | O2 | O5/E5 | C6@fly |
|---|---|---|---|---|
| Local dev only? | ✓ | |||
| Single project, own infra? | ✓ | ✓ | ||
| Need per-capability scaling? | ✓ | |||
| Multi-tenant SaaS on Reactor? | ✓ | |||
| Zero ops burden? | ✓ | |||
| Offline / air-gapped? | ✓ | ✓ |
Typical path: Start at O1 with Studio → deploy to O2 or C6@fly for production → graduate to size 5–6 when traffic or compliance demands isolation.
Migrating between sizes
Section titled “Migrating between sizes”Moving between sizes does not require application rewrites:
- Export your Postgres database (
pg_dump) - Copy blob/function/site directories from
.reactor/or/data - Point
Reactor.tomlat the new topology’s infrastructure - Run
reactor-server migrate(orPOST /_admin/migrate) - Deploy your bundle via CLI or
/_admin/deploy
Related
Section titled “Related”- Self-hosting —
O2Docker, Compose, Fly.io - Configuration — full
Reactor.tomlreference - Architecture overview — Rust workspace and capability model