The poke transport: how an insert announces "runnable work exists NOW" to
schedulers, instead of leaving discovery to the poll timer. Configured per
instance via the :poke engine option:
:local(default) — poke the caller's node only. Zero moving parts; other nodes discover the work on their next poll.:cluster— poke every node's schedulers of the queue over Erlang distribution. Membership rides an OTP:pgscope (one per instance; schedulers join their queue's group), so a poke is an ETS lookup plus direct sends — no broadcast storms, only nodes that actually run the queue are reached. Without distribution it degrades to:local.{:redis, url_or_opts}— publish over Redis Pub/Sub, for clusters without Erlang distribution. Requires the optional:redixdependency. The caller's node is poked directly (no Redis round-trip, and a Redis outage cannot lose local pokes); the publish carries the origin VM's token so subscribers skip self-originated messages. A per-queue distributed dedup lock (SET NX PX) collapses a burst/stream of inserts into at most one broadcast per ~100ms window across the whole fleet, so the fan-out does not scale with the insert rate.
Besides inserts, pokes announce every engine-driven wake: a signal flipping
a parked row, a fan-out's freshly-inserted children (in their queues), and
a parent whose join the last child just completed. Delivery is
best-effort in every mode — a lost poke costs one poll interval, never
correctness. The poll remains the discovery floor for what a poke cannot
see: retry backoffs, the reaper's wakes (await timeouts, crash reclaims),
and remote events under :local.
A poke only wakes an idle scheduler — the idle → work transition it
exists for. A scheduler with work in flight drops it and rediscovers new work
on its next task completion (or poll), so a fan-out never becomes N nodes all
picking on every insert. An idle scheduler additionally debounces the poke
stream — the local leg has no sender-side dedup, so it coalesces every poke in
a short window into a single pick (see GenDurable.Scheduler). Together with
the Redis dedup lock, a hot insert stream stays a trickle of picks, not a herd.