Skip to main content

PERF-WF-001 — Bound Workflow polling and request fan-out

FieldValue
StatusOpen; source-verified, scale pending
Architecture stateDeployed behavior
SeverityHigh
Affected surfaceWorkflow list, detail auto-refresh, runtime tabs, task statistics, recommendations, and monitoring
Componentssparqd/oqullus, sparqd/bff-api, sparqd/workflow-backend, Airflow, monitoring
Associated issueNot opened

Where the problem appears​

Record requests for the list and one detail page for sixty seconds across workflow states and browser visibility.

Concrete observed case​

The list performs a paged workflow request, two additional count requests, runtime enrichment, task-state aggregation, and recommendations. Detail polls managed state every five seconds while run, task, and log views can also poll Airflow. BFF and workflow-backend each cache selected runtime observations.

Expected condition​

Define one refresh coordinator, coalesce equivalent observations, stop or slow polling when hidden or terminal, back off on failure, and expose observation age. Establish supported workflow, run, task, log, and concurrent-browser limits.

Cause and evidence​

  • Multiple independent UI effects initiate runtime refresh.
  • Task statistics can fan out across workflows and recent runs.
  • Caching exists in more than one service with different keys and scopes.

Why it matters​

Tenants can create sustained Airflow and BFF load simply by leaving pages open; stale cache layers can also disagree.

Existing controls and workarounds​

Disable Auto refresh when continuous updates are unnecessary and close inactive Workflow pages.

Alternatives considered​

  1. Recommended: workflow-scoped aggregated read with conditional polling and shared freshness.
  2. Event or WebSocket delivery for state changes, with reconnect polling fallback.
  3. Keep independent polling with lower frequency — reduces load but not duplication or coherence problems.

Component involvement​

  • sparqd/oqullus owns one page refresh coordinator.
  • sparqd/workflow-backend supplies coherent runtime aggregation; it becomes workflow-authorized aggregation only after OpenFGA activation.
  • sparqd/bff-api avoids duplicate runtime caches; operations defines performance boundaries.

Reproduction and verification​

Follow WF-S013.

Resolution conditions​

Close when request counts and upstream calls remain bounded across representative scale, hidden tabs back off, current caches are isolated by the active workspace/user contract, and freshness is visible. Before multi-project rollout, additionally prove cache keys cannot cross OpenFGA resource grants.

Validation and blockers​

Oqullus, BFF, workflow-backend, Airflow, monitoring, and operations owners must validate with load evidence.