Scaling and capacity
FlowCatalyst scales in two different ways. The request-serving parts (the platform API, the push gateway, function runners, ingestor runtimes) scale out: add replicas. The ordering-sensitive background parts (the dispatch scheduler, the stream processor, the scheduled-job scheduler, the outbox processor and the router) are single-active by design: you make the one active copy faster, not more numerous.
What scales how
Section titled “What scales how”| Part | Scaling | Bounded by |
|---|---|---|
| Platform API (including the delivery callback) | Out: add replicas behind the load balancer | Database connections and CPU; outbound delivery latency |
| Dispatch scheduler | Up: one active copy; FC_SCHEDULER_DISPATCHERS lanes publish in parallel |
Claim query latency, broker round trips |
| Stream processor (fan-out, projections, partitions) | Up: one active copy; batch sizes | Database write throughput |
| Router | Up: one active copy; pool concurrency | CPU per message, broker API, the delivery callback |
| Scheduled-job scheduler, outbox processor | Up: one active copy | Rarely a bottleneck |
| Push gateway | Out | Memory per open stream |
| Function runners | Out, per runner pool | Memory budget; each process enforces a function’s concurrency limit on its own |
| Ingestor runtimes | Out: polled sources are shared out, push sources run on every runtime | Source latency; the platform’s jobs API |
| PostgreSQL | Up, plus read capacity for the console | Everything above writes to it |
Why single-active: a message group’s order lives in the active process’s memory (the scheduler’s lanes, the router’s per-group buffers), and the stream processor’s fan-out must create a group’s jobs in event order. Two active copies would each handle part of a group. See leader-gated processors.
Where a dispatch job’s load lands
Section titled “Where a dispatch job’s load lands”For the platform’s own dispatch jobs, the router does not deliver to the consumer. For each queue
message it calls the platform’s delivery callback, POST /api/dispatch/process, on the API tier,
which loads the job, claims it, makes the real HTTP request to the consumer, records the attempt and
answers. So:
- The API tier carries delivery. Each in-flight delivery holds a request on an API replica for as long as the consumer takes to answer (the job’s timeout, 30 seconds by default). Concurrent deliveries ≈ delivery rate × consumer latency, spread over the API replicas.
- The router’s pool concurrency bounds how many deliveries per pool are in flight at once, across the whole installation (one active router).
- The database sees a handful of writes per delivery: claim, attempt, status, projection.
To raise dispatch throughput, look first at consumer latency and pool concurrency, then at API replicas and database capacity. The router is rarely the limit.
Process sizing
Section titled “Process sizing”fc-server tunes the Go runtime to its container:
- Under a CPU limit of one CPU or less it sets
GOMAXPROCS=1(Go’s own default never goes below 2, which costs throughput on a one-CPU quota). - With the router or scheduler enabled it raises the GC target to 200 and sets a soft memory limit at 90 % of the container’s memory limit, trading memory for throughput. At one CPU the router used about 714 MB at a GC target of 200, against about 522 MB at 100.
- Explicit
GOMAXPROCS,GOGC,GOMEMLIMITorFC_GC_PERCENToverride this.
Reasonable starting points: API replicas at 1 to 2 CPUs and 1 to 2 GB; a router at 1 to 2 CPUs and 2 GB; the worker tier at 1 CPU and 1 GB. Then size by measurement.
Pools, concurrency and slow consumers
Section titled “Pools, concurrency and slow consumers”Pool settings decide most of what operators experience as “slow”:
- Concurrency caps simultaneous deliveries for the pool. A pool also buffers up to
max(concurrency × 40, 100)messages; beyond that it defers new messages back to the broker. - Rate limit is a token bucket whose burst is one minute’s worth. It shapes delivery into bursts and pauses, and the wait is invisible on the dashboard; see pool draining slowly.
- Ordered groups are delivered one message at a time per group. A pool’s concurrency only helps across groups, never within one.
- One delivery attempt may take up to 15 minutes, and a message up to three attempts. That is a deliberate contract for consumers that do long synchronous work. At concurrency 1, one such consumer can occupy its pool, and every group in it, for that long. Give slow consumers their own pool, with concurrency at least the number of groups that must progress at the same time.
- Very large backlogs. A deferred message is still in flight to the broker, and an SQS FIFO
queue stops delivering at 20,000 in-flight messages. A backlog beyond about 15,000 on a queue
shared with other pools (
FC_ROUTER_DEFERRAL_BUDGET) needs its own queue or a paced producer.
See dispatch pools.
Measured numbers
Section titled “Measured numbers”All of these come from local benchmark runs. Read them as “what this code costs”, not as capacity promises for your environment.
Router
Section titled “Router”Measured in October 2026 on a laptop-class machine (an Apple M4 Pro running Linux containers), with an in-memory SQS-compatible fixture as the broker and a sink that answers at once: 100 queues and 100 pools of 64 workers, 500,000 messages fed faster than the router could take them, the router pinned to its own cores. Steady delivered messages per second:
| Router CPUs | Steady msg/s | CPU time per message |
|---|---|---|
| 1 | about 20,000 | about 50 µs |
| 2 | about 35,000 | about 57 µs |
| 4 | about 60,000 | about 64 µs |
What the numbers do not include: real SQS (whose API latency and per-queue limits apply), real consumers (whose latency, not the router, usually sets the pace), and the delivery callback (for platform dispatch jobs, every message also costs an API request and database writes). Earlier runs against a general-purpose SQS emulator measured the emulator, not the router, and are not quoted here.
Push gateway
Section titled “Push gateway”Measured in November 2026 on one laptop with the load generator, the gateway and PostgreSQL sharing the machine (so CPU and latency figures are pessimistic, memory figures are the module’s own):
- Idle streams: about 42 to 44 KiB of memory per open stream; 50,000 streams took about 2.1 GB, 100,000 about 4.1 GB.
- Fan-out: 10,000 streams on 10,000 topics at 5,000 pushes a second: p99 delay about 6 ms, no loss, no duplicates.
- Restart under load (
kill -9with 10,000 streams at 1,000 pushes a second): every stream back within about 5 seconds, worst delay about 4 seconds, nothing lost or duplicated.
Size gateway replicas by memory for the streams you expect, and spread streams across replicas.
Not measured
Section titled “Not measured”- The event ingest write path (batch API, outbox relays, fan-out) has been reviewed but not benchmarked end to end. It is PostgreSQL insert throughput: scale the database, and keep batches large.
- The dispatch scheduler has no published benchmark. Its levers are
FC_SCHEDULER_DISPATCHERS,FC_SCHEDULER_BATCH_SIZEand the database’s claim latency; watchfc_scheduler_pending_oldest_age_seconds.
Function runners
Section titled “Function runners”A runner process budgets function memory from its container’s memory limit, minus a reserve for
itself (FC_FUNCTIONS_MEMORY_RESERVE_MB, by default the larger of 128 MiB and 10 %). When a function
needs memory the budget does not have, that call is answered 503 and nothing else is affected. Add
replicas behind the pool’s URL for more capacity; remember that a function’s concurrency limit applies
per replica, so three replicas allow three times the limit. See
running function runners.
Ingestor runtimes
Section titled “Ingestor runtimes”Polled sources (SFTP, S3, database polls, API polls, extension kinds) run on one runtime at a time and are shared out evenly over the live runtimes that carry their kind. Push sources (HTTP, SQS, RabbitMQ) run on every runtime. More runtimes therefore spread polled work and add capacity for push sources. See running ingestor runtimes.
Read next
Section titled “Read next”- Monitoring and alerting: the signals that tell you which part is the bottleneck.
- Router and dispatch scheduler.