A message queue between hub and runners issue #34
open andymccall opened this · 0 comments
andymccall
Andy (2026-10-02): to scale, replace runners polling /flow/claim (a SQL query per poll) with a queue: the hub publishes jobs per (labels, runtime, scope) topic, runners subscribe and ack; job state events (started, log, finished) flow back the same way; at-least-once with the hub's job id as the idempotency key. Candidates: NATS JetStream (small, Rust client) or a built-in queue over the hub's own WebSocket; claims keep their checks (scope, images, room).
Andy (2026-10-02): to scale, replace runners polling /flow/claim (a SQL query per poll) with a queue: the hub publishes jobs per (labels, runtime, scope) topic, runners subscribe and ack; job state events (started, log, finished) flow back the same way; at-least-once with the hub's job id as the idempotency key. Candidates: NATS JetStream (small, Rust client) or a built-in queue over the hub's own WebSocket; claims keep their checks (scope, images, room).