Merged
Size
XL
Change Breakdown
Feature70%
Performance15%
Refactor15%
#3114feat(supervisor): compute workload manager

Tasks can execute on dedicated compute instances with microVM support

Tasks can execute on dedicated compute instances with microVM support

A new compute workload manager routes runs to a dedicated gateway, enabling template pre-warming, fast checkpoint restorations, and delayed snapshots.

The platform can now route task execution through a dedicated compute gateway, unlocking microVM-based workloads. Previously, execution was limited strictly to Docker and Kubernetes environments.

Tasks are now pre-warmed during the deployment phase, creating templates ahead of time for faster boot sequences. When tasks suspend, a new delayed snapshot system waits to see if the waitpoint resolves quickly before committing to a snapshot. This saves unnecessary computational overhead on short pauses. The compute gateway handles instant checkpointing and restoration of running instances, emitting nanosecond-precision OpenTelemetry spans to track exactly where time is spent.

These capabilities are wired directly through the supervisor daemon and the web deployment pipeline, backed by a new shared internal compute package.

View Original GitHub Description

Adds the ComputeWorkloadManager for routing task execution through the compute gateway, including full checkpoint/restore support, OTel trace integration, and template pre-warming.

Changes

Compute workload manager (apps/supervisor/src/workloadManager/compute.ts)

  • Routes instance create, snapshot, delete, and restore through the compute gateway API
  • Wide event logging on create with full timing and context
  • Configurable gateway timeout, auth token, image digest stripping

Compute snapshot service (apps/supervisor/src/services/computeSnapshotService.ts)

  • Timer wheel for delayed snapshot dispatch (avoids wasted work on short-lived waitpoints)
  • Configurable dispatch concurrency limit (COMPUTE_SNAPSHOT_DISPATCH_LIMIT)
  • Snapshot-complete callback handler with suspend completion reporting
  • Trace context management and OTel span emission for snapshot operations

OTel trace service (apps/supervisor/src/services/otlpTraceService.ts)

  • Fire-and-forget OTLP span emission for compute operations (provision, restore, snapshot)
  • BigInt nanosecond conversion preserving sub-ms precision for span ordering

Template creation (apps/webapp/app/v3/services/computeTemplateCreation.server.ts)

  • Three-mode rollout: required (MICROVM projects), shadow (feature flag / percentage), skip
  • Integrated into deploy finalize flow

Shared compute package (internal-packages/compute/)

  • Gateway client with namespace-based API (instances, templates, snapshots)
  • Zod schemas for all gateway request/response types

Database

  • COMPUTE variant added to TaskRunCheckpointType enum
  • WorkloadType enum and column on WorkerInstanceGroup
  • hasComputeAccess feature flag

Env / config

  • Compute gateway URL, auth token, timeout
  • Snapshot enable flag, delay, dispatch limit
  • Dedicated OTLP endpoint for compute spans (COMPUTE_TRACE_OTLP_ENDPOINT)
© 2026 · via Gitpulse