Sim runs an app, a realtime server, PostgreSQL, Redis, and a scheduler. This page shows their dependencies and the state you need to preserve.
Services
App
The Next.js app serves the workflow builder, API routes, and workflow orchestration. Local JavaScript runs in Node child workers using isolated-vm inside the app container. The app and those workers share the container's memory budget. The Helm chart requests 4 GiB and limits the app to 8 GiB; docker-compose.prod.yml sets an 8 GB memory limit without a reservation.
E2B or Daytona moves supported code execution to a remote sandbox. TRIGGER_DEV_ENABLED routes asynchronous jobs to Trigger.dev; the default deployment uses database-backed jobs. See Sandboxes for the provider and image requirements.
Any replica can serve files once shared object storage is configured. Before adding replicas, configure storage, Redis, and database connection capacity as described in Scaling and high availability.
Realtime
The Bun Socket.IO server carries collaborative editing, live execution updates, and collaborative documents. Clients connect at /socket.io.
Realtime shares PostgreSQL and BETTER_AUTH_SECRET with the app, using Better Auth's shared-database-session pattern. It authenticates the same accounts without a separate login.
A realtime server must exist for editing and live updates. Set realtime.enabled: false in Helm only when app.env.SOCKET_SERVER_URL points to a realtime instance you run separately.
Migrations
The migrator applies Drizzle SQL and registered data migrations, then exits. Compose runs it as a one-shot service. Helm runs it as an app init container, so migrations complete before that app pod starts. Later pods and rollouts run the migrator again; already-applied migrations are skipped.
Migrations are forward-only. See Upgrades for backup and rollback procedures.
PostgreSQL
Sim requires PostgreSQL with the pgvector extension for knowledge base embeddings. The bundled image uses PostgreSQL 17 and includes pgvector. On managed PostgreSQL, make the extension available; migrations issue CREATE EXTENSION where permissions allow.
PostgreSQL holds workflows, runs, logs, accounts, organizations, credentials, knowledge base chunks and embeddings, table data, and upload-session state.
Redis
Redis carries live events and stores shared coordination state. Some stores fall back to PostgreSQL or process-local state, but cross-pod collaboration has no local fallback. CLI API-key pairing also requires Redis, even with one replica; OAuth login uses a separate path. See Redis for the full fallback matrix.
Scheduler
Scheduled workflows, polling triggers, connector syncs, subscription renewal, and maintenance jobs call authenticated app endpoints. Helm provides CronJobs; Compose provides a supercronic service. See Background jobs for the shipped inventory and the additional upload-session cleanup schedule operators must configure.
Optional Chat service
The chart can also render the optional copilot service, its separate PostgreSQL database, and its migration job. These are separate from the app and workflow database. Enabling them requires the service's image, license, credentials, and database configuration; see the chart's copilot values and reference architectures.
Where state lives
Redis is a cache and message bus, not the owner of committed application data. Losing it interrupts in-flight coordination and live updates; completed data remains in PostgreSQL and object storage.
Request paths
Cloud uploads use a single PUT through 50 MiB and multipart above that. Local uploads use a single PUT through 8 MiB and multipart above that. Cloud buckets need CORS for the Sim origin and must be reachable from browsers; downloads are proxied through the app. Local uploads need no bucket CORS configuration.
Network boundaries
The proxy must support WebSocket upgrades, streams, and long-lived connections. The chart's optional NetworkPolicy excludes cloud metadata addresses from broad egress, but its default ingress peer is broad. Configure the actual peers and managed-datastore paths before enabling it.