Skip to content

Components at a glance

Every component below except the ingestor runtime is part of the fc-server binary and is switched on with an environment variable. “Leader-gated” means only one copy works at a time: with FC_STANDBY_ENABLED=true the copies elect a leader through Redis, and without it you must run a single copy. The architecture overview explains how the components work together.

Component What it does Toggle State it owns How it scales Read more
API server and console The platform HTTP API (/api, OpenAPI 3.1), the OAuth 2.0 / OIDC provider (/oauth, /auth), the portal and field identity surfaces (/portal, /field), the server-rendered console (/ui), console-only endpoints (/bff), and the delivery callback the router calls (/api/dispatch/process). Serves the router’s configuration document. FC_PLATFORM_ENABLED (on by default) All platform tables in PostgreSQL: identity (iam_*, OAuth), messaging (msg_*), functions (fng_*), ingestion (ing_*), configuration and audit. Runs migrations and seeding at start-up. Stateless; any number of replicas behind a load balancer API server and console
Housekeeping Purges expired tokens, login states and ceremonies; maintains login-attempt partitions; returns stranded jobs of a blocked message group to PENDING; prunes idempotency keys, function traces and ingestion records past retention. Runs with the platform (no toggle) Nothing of its own; bounded deletes and updates on platform tables Runs on every replica; every sweep is idempotent fc-server and subsystems
Stream processor Fan-out: matches new events to subscriptions and creates dispatch jobs. Projections: keeps read-optimised copies of events and dispatch jobs. Partition manager: creates future monthly partitions and drops expired ones. FC_STREAM_PROCESSOR_ENABLED, with FC_STREAM_EVENTS_ENABLED, FC_STREAM_DISPATCH_JOBS_ENABLED, FC_STREAM_FAN_OUT_ENABLED, FC_STREAM_PARTITION_MANAGER_ENABLED (each on by default) Progress markers on msg_events and msg_dispatch_jobs; the *_read projection tables; the partitions Leader-gated, one election for all four parts. Batch sizes are tunable Stream processor
Dispatch scheduler Claims PENDING dispatch jobs in group order, holds back blocked groups and paused connections, publishes a pointer per job to the client’s queue and marks the job QUEUED. Recovers jobs left QUEUED or PROCESSING too long. Signs the delivery-callback token. FC_SCHEDULER_ENABLED Job status transitions; its own small database pool; in-memory lanes (one per group hash) Leader-gated. Within the leader, FC_SCHEDULER_DISPATCHERS lanes (default 10) publish in parallel Dispatch scheduler
Message router Polls every queue, routes each message to its dispatch pool, keeps per-group FIFO buffers, applies each pool’s concurrency and rate limit, defers when a pool is full, and calls the target (for dispatch jobs, the platform’s delivery callback). Has its own dashboard and API under /router. FC_ROUTER_ENABLED In memory only: pools, group buffers, in-flight messages, circuit breakers. Its pool and queue list comes from the configuration document at FLOWCATALYST_CONFIG_URL Leader-gated: with standby, pools start only on the leader. Needs no database Message router
Scheduled-job scheduler Evaluates cron expressions, creates scheduled-job instances, and delivers signed firings to their targets. FC_SCHEDULED_JOB_ENABLED Scheduled-job instances and their logs Leader-gated (exactly one firing per tick) Scheduled-job scheduler
Outbox processor Reads outbox_messages rows and posts them to the platform’s batch endpoints by row type, one result per item, in group order. In fc-server it reads the database fc-server is connected to, or MySQL / MariaDB, MongoDB or SQLite (FC_OUTBOX_BACKEND); fcdev outbox reads an application’s PostgreSQL or MySQL / MariaDB. FC_OUTBOX_ENABLED The outbox table’s row status Leader-gated in fc-server; fcdev outbox elects its own leader through the source database, so any number may run Outbox processor
Function runner Loads published function versions and serves them over HTTP (/fn/<address><path>, plus an optional public entry). Runs WebAssembly modules and JavaScript bundles; Java functions run in the ingestor instead. FC_FUNCTIONS_ENABLED A local cache of function artifacts; desired state fetched from the platform Stateless. Scale by adding runners; each serves one runner pool (FC_FUNCTIONS_POOL) Function runners and engines
Push gateway Hosts the framework’s push module for many applications: POST /api/push/subscriptions, GET /api/push/stream (server-sent events), GET /api/push/keys. FC_PUSH_ENABLED The push outbox and log (PostgreSQL by default, Redis with FC_PUSH_DRIVER=redis); per-application rules, ticket keys and limits; open streams in memory Many tasks; one relay at a time, chosen by a database lock. Can run beside the API or as its own service Push gateway
App updates Serves over-the-air updates to Expo phone apps over the open Expo Updates protocol: signed manifests, branches by app key, platform, runtime version and channel, staged rollouts and rollbacks, and install links for sideloaded Android builds. Published with fcdev updates. Part of the platform API; signing keys named in FC_APP_UPDATES_SIGNING_KEYS Updates, branches, binaries and install links in PostgreSQL; update files in a file store (FC_APP_UPDATES_STORE: a directory or S3) Stateless; any number of replicas fcdev
MCP server A read-only Model Context Protocol server for LLM clients, with 12 tools such as list_event_types, get_schema, get_openapi and whoami. Proxies the platform API with its own credential. FC_MCP_ENABLED (binds 127.0.0.1:8090 by default) None Stateless MCP server
Metrics listener Prometheus metrics for the whole process. Always on (FC_METRICS_PORT, default 9090) None One per process Monitoring
Component What it does How it is switched on State it owns How it scales Read more
Ingestor runtime A Java 25 and Apache Camel process that reads ingestion sources (SFTP, S3, SQS, RabbitMQ, polled databases and APIs, HTTP pushes on /ingest/..., Camel routes, extensions), splits payloads and sends the records to the platform, which creates the dispatch jobs or events. Also hosts Java functions. Its own image and process. The platform side needs FC_INGESTION_ENABLED=true Nothing durable: definitions, leases, cursors and reports live on the platform and are reached through its runtime API (/api/ingestion-runtime/v1) Any number of runtimes. A polled source runs on one runtime at a time under a lease; HTTP, SQS and RabbitMQ sources run on every runtime that carries them Ingestor runtime
fcdev The local development binary: every subsystem above in one process, an embedded PostgreSQL, the PostgreSQL queue, seeded development credentials, an ingestor child process, and the fn, ingest, outbox, mcp and profile commands. Run fcdev A per-user data directory One per developer fcdev
Listener Default Variable
API, console, router surface, push gateway 8080 FC_API_PORT
Metrics 9090 FC_METRICS_PORT
MCP 127.0.0.1:8090 FC_MCP_PORT, FC_MCP_BIND
Function runner, private entry 8095 FC_FUNCTIONS_PORT
Function runner, public entry off FC_FUNCTIONS_PUBLIC_PORT
Ingestor runtime (HTTP ingestions, health) 8091 the runtime’s own setting
From To How
Outbox relay API POST /api/{events,dispatch-jobs,audit-logs}/batch with a service-account token
Stream processor, dispatch scheduler, scheduled-job scheduler PostgreSQL Direct, claims with FOR UPDATE SKIP LOCKED
Dispatch scheduler Queue Publishes one pointer per job
Router Queue Polls, acknowledges, defers
Router API Fetches the configuration document (client credentials); calls the delivery callback; reports settled message groups
API (delivery callback) Consumer endpoints Signed POST, guarded against private and metadata addresses
Function runner API Desired state, heartbeat, artifacts, emitted events and dispatch jobs
Ingestor runtime API Poll, report, state, jobs, secrets, traces. The platform never calls the runtime, so it can sit behind a firewall
Push gateway PostgreSQL (and Redis for the Redis driver) Its own database pool