Cost Models // FlowLedger Research
BullMQ & Redis 7 Worker Concurrency Sizing Model
Activepieces dispatches flow runs through BullMQ on Redis 7; misconfigured maxmemory eviction silently drops queued webhooks under burst load.
Measured Unit Economics & Telemetry
Every trigger event enters Redis 7 as a BullMQ delayed or active job before workers pop and hydrate step state. At 200k-500k monthly runs with 8-12 concurrent workers, Redis stays between 180 MB and 450 MB RSS, provided completed jobs are pruned and --maxmemory-policy is locked strictly to noeviction.
| Resource / Billing Line | Audited Value | FinOps Impact |
|---|---|---|
| Concurrency = 4 (Up to 100k runs) | ~140 MB Redis RSS | Handles ~8-12 flow starts/sec |
| Concurrency = 8 (200k-500k runs) | ~220 MB Redis RSS | Optimal sweet spot on KVM 2 (2 vCPU) |
| Concurrency = 16 (1M+ runs) | ~440 MB Redis RSS | Requires 4-8 vCPU on KVM 4 / KVM 8 |
| Required Eviction Policy | noeviction | Prevents silent BullMQ state corruption |
Implementation & Configuration Checklist
- Enforce Redis noeviction: Pass --maxmemory-policy noeviction so BullMQ lock keys and delayed triggers are never evicted.
- Enable Append-Only Persistence (AOF): Run --appendonly yes so container restarts recover in-flight webhook queues cleanly.
- Align Concurrency to vCPU Count: Keep AP_FLOW_WORKER_CONCURRENCY between 3x and 4x vCPU count for I/O-bound HTTP flows.
command: redis-server --appendonly yes --maxmemory 384mb --maxmemory-policy noeviction
AP_QUEUE_MODE=REDIS
AP_FLOW_WORKER_CONCURRENCY=8
Workflow Infrastructure FAQ
Why does Redis default volatile-lru or allkeys-lru break BullMQ?
Evicting active BullMQ lock or job keys strands running workflows and loses scheduled retry timers.
Should I run Redis on a separate VPS from Activepieces?
No. Keeping Redis 7 on the same Docker bridge keeps BullMQ sub-millisecond polling overhead near zero.