Skip to content

vxdata-api offload blocking routes

Problem

Production investigation showed long-running API requests coinciding with probe failures. Code review found synchronous MinIO, ConnectorX, and Polars work running directly inside async FastAPI handlers. This can occupy the sole Uvicorn event loop and delay unrelated requests.

Delivered

  • Opened mono PR #380 from fix/vxdata-api-event-loop-stalls at commit c87dd7aa.
  • Converted four synchronous S3 handlers to def, allowing FastAPI to dispatch them through its worker threadpool.
  • Converted the complete /query/parquet route-to-CRUD-to-Polars chain to synchronous functions and removed its unused AsyncSession dependency.
  • Kept the patch surgical: four files, 9 insertions and 15 deletions, with no API contract, deployment, probe, scaling, limits, SDK, or migration changes.
  • GPT-6 Astra independently reviewed and approved the exact diff. GPT-5.6 Sol implemented it.

Validation

  • Full vxdata-api suite: 87 passed.
  • Storage service tests: 15 passed.
  • Scoped-access Parquet regression: passed.
  • Typecheck and explicit Ruff checks of changed files passed.
  • Module boundary check passed.
  • PR was open and mergeable with CI in progress at the last check.

Follow-up

  • Decouple edge nginx liveness from upstream API health.
  • Add bounded concurrency and result limits for heavy Parquet and S3 operations.
  • Add event-loop lag and per-phase request timing instrumentation.
  • Review replicas, rollout strategy, and migration coordination separately.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close