Cost Models // FlowLedger Research
BullMQ Queue Backpressure & Exponential Webhook Retry Economics
Unbounded retries against rate-limited SaaS APIs multiply worker RAM and queue depth 4x during outages; proper backoff keeps queues flat.
Measured Unit Economics & Telemetry
When Shopify, HubSpot, or Notion returns HTTP 429 Too Many Requests, naive retry loops hold worker slots open and pile duplicate jobs onto Redis BullMQ. Combining AP_FLOW_WORKER_CONCURRENCY throttling with explicit HTTP 429 Retry-After handling—or routing sensitive rate-limited SaaS connectors through Make.com managed queues—prevents cascading backlog.
| Resource / Billing Line | Audited Value | FinOps Impact |
|---|---|---|
| Unthrottled Retry Storm | 4x queue amplification | Saturates BullMQ workers & Postgres I/O |
| AP_WEBHOOK_TIMEOUT_SECONDS | 30 seconds | Frees stalled TCP sockets promptly |
| Delayed Retry Backoff Window | 15s / 60s / 300s | Clears upstream 429 rate-limit buckets |
| Make.com Managed Rate Queue | Built-in 429 handling | 10,000 free starter ops for SaaS endpoints |
Implementation & Configuration Checklist
- Respect Retry-After Headers in HTTP Steps: Pause or route rate-limited responses into delayed webhooks instead of tight 1-second retry loops.
- Bound Flow Execution Timeout: Set AP_FLOW_TIMEOUT_SECONDS=600 so hung third-party sockets cannot occupy BullMQ slots indefinitely.
- Alert on Redis Queue Length > 1,000: Check Redis LLEN bull:flowJobs:wait to spot upstream API outages early.
AP_WEBHOOK_TIMEOUT_SECONDS=30
AP_FLOW_TIMEOUT_SECONDS=600
AP_FLOW_WORKER_CONCURRENCY=8
Workflow Infrastructure FAQ
Does Redis store failed flow payloads indefinitely?
BullMQ retains failed job references per configured limits while full step traces follow AP_EXECUTION_DATA_RETENTION_DAYS.
How do I stop duplicate webhooks from triggering double writes?
Store an idempotency key in Redis with a 24-hour TTL at step 1 before executing downstream mutations.