Skip to content

Queue System

The queue system uses RQ, a job-management library backed by Redis.

  • isard-apiv4 enqueues storage jobs.
  • isard-storage consumes them.
  • isard-engine dispatches hypervisor lifecycle actions (start, stop, snapshot).

Both isard-apiv4 and isard-storage containers must access TCP port 6379 on the isard-redis container.

This replaces the old fixed-priority queues

Earlier releases used the isard-api container and three fixed lanes per pool (storage.<pool>.high, storage.<pool>.default, and storage.<pool>.low). These are no longer used. The API is now isard-apiv4, and priority is determined by an action-driven tier model at dequeue time.

Queue naming

Storage queues use the format storage.<storage_pool_id>.<tier>.

Workers subscribe to the tiers for their assigned pool in priority order. The system assigns a job to a tier based on the action and its trigger, not on a priority supplied by the caller.

Tiers (most-urgent first)

Tier Purpose Example actions
interactive A single action a user is actively waiting on. Sub-second target; served by the always-on reserved pool. desktop create, volatile create on a non-persistent start
standard A single foreground operation that is not click-and-wait. Seconds target. disk resize, recreate, an awaited media download
template Whole-disk template-from-desktop copies. Heavy, kept on its own governed lane. template creation
bulk Mass operations where throughput matters more than latency (marked by the producer). deployment create, bulk create/recreate
maintenance Long best-effort work. Never on the reserved pool. convert, sparsify, disconnect, downloads, pool move
reclaim Physical space reclamation after the item already disappeared from the UI. delete, move_delete, bulk delete, broom sweeps
background Lowest tier: idle-only metadata refreshes nobody is blocked on. post-stop qemu-img info size refresh, batch status re-scan

The two foreground tiers (interactive, standard) ride flat reserved / std lanes. The other five (template, bulk, maintenance, reclaim, background) are the governed set, fair-scheduled on the elastic / template / background-floor pools; a governed job can never be promoted onto a foreground lane.

How the governor drains queues

  • Priority order. Within a pool, the governor drains interactive before standard, and then the governed tiers. A job's wait time is determined by all jobs ahead of it in higher-priority lanes.
  • PSI-defer. Under node CPU, IO, or memory pressure, deferrable tiers (template, maintenance, reclaim, background) are hidden from the dequeue order so urgent work proceeds. bulk is fair-scheduled but never deferred.
  • Max-heavy cap. Genuine node-loaders (template, maintenance) count against a global heavy-concurrency cap. reclaim (a plain unlink or rename) is deferrable but not capped.

Feedback to the user is emitted regardless of tier. Only the scheduling of low tiers is deferred.

Legacy priority strings

Older call sites and admin API parameters may still send high / default / low. These are normalised: high → interactive, low → maintenance, and default is resolved from the action.