Control-plane watch polls the database per subscriber #1858

Open
opened 2026-11-10 15:26:30 +00:00 by sam · 0 comments
Owner

The control-plane watch is implemented as a 250 ms database poll per subscription. An idle instance therefore runs about 200 transactions a second, almost all sequential scans of the 28-row resources table; the transaction counter and buffer activity are dominated by it rather than by real work.

Wanted: replace the per-subscriber polling with a push path — LISTEN/NOTIFY from the resource write, or one shared poller in the State Store that fans out to streams — while keeping the same watch contract (resume from a version, no missed update).

Done when: an idle instance's transaction rate drops to a small baseline and a resource change still reaches every watcher promptly.

The control-plane watch is implemented as a 250 ms database poll per subscription. An idle instance therefore runs about 200 transactions a second, almost all sequential scans of the 28-row resources table; the transaction counter and buffer activity are dominated by it rather than by real work. Wanted: replace the per-subscriber polling with a push path — LISTEN/NOTIFY from the resource write, or one shared poller in the State Store that fans out to streams — while keeping the same watch contract (resume from a version, no missed update). Done when: an idle instance's transaction rate drops to a small baseline and a resource change still reaches every watcher promptly.
sam added the mediumtask labels 2026-11-14 14:45:41 +00:00
sam added the deferred label 2026-11-15 17:26:10 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1858