Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow que to be started without listen/notify #395

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

dtcristo
Copy link
Contributor

@dtcristo dtcristo commented May 19, 2023

Ability to disable listen/notify on CLI resulting in jobs being picked up purely from polling. We have seen issues with listen/notify usage at scale.

@oeoeaio
Copy link
Contributor

oeoeaio commented Jul 5, 2023

Thanks for this! No idea why this is not already configurable. If you can add some specs I'll be happy to approve and merge this. :)

Ability to disable listen/noify on CLI resulting in jobs
being picked up purely from polling. We have seen issues
with listen/notify usage at scale.
@dtcristo dtcristo changed the base branch from master to 1.x July 5, 2023 06:16
@dtcristo dtcristo changed the base branch from 1.x to master July 5, 2023 06:16
@dtcristo
Copy link
Contributor Author

dtcristo commented Jul 5, 2023

@oeoeaio I've updated the commit with a spec for the new option. Ready for review.

@mnbbrown
Copy link
Contributor

Do you think we could get this merged?
@dtcristo / @ZimbiX shout if I can help in anyway.

@oeoeaio oeoeaio merged commit d58b3f4 into que-rb:master Oct 16, 2023
17 checks passed
@dtcristo dtcristo deleted the dtcristo/diable-listen-on-cli branch October 16, 2023 03:18
@ZimbiX
Copy link
Member

ZimbiX commented Oct 16, 2023

Sorry for the delay!

Out of curiosity, what issues were you seeing with listen/notify at scale?

@dtcristo
Copy link
Contributor Author

@oeoeaio Thanks for merging!

Out of curiosity, what issues were you seeing with listen/notify at scale?

Hey @ZimbiX, we have quite a high throughput of jobs in our system. Average of 150 jobs/s peaking to about 700 jobs/s at times. We had issues where listen/notify queue would fill quickly and when full subsequent listen/notify calls would fail. I believe there were issues where long running transactions prevented the queue from being emptied if the transactions covered items in the queue.

I feel listen/notify is ideal for systems with lower job throughput with sporadic events and you need low latency. In a system with high throughput like ours, poll mode works fine.

@mnbbrown
Copy link
Contributor

@oeoeaio Thanks for merging!

Out of curiosity, what issues were you seeing with listen/notify at scale?

Hey @ZimbiX, we have quite a high throughput of jobs in our system. Average of 150 jobs/s peaking to about 700 jobs/s at times. We had issues where listen/notify queue would fill quickly and when full subsequent listen/notify calls would fail. I believe there were issues where long running transactions prevented the queue from being emptied if the transactions covered items in the queue.

I feel listen/notify is ideal for systems with lower job throughput with sporadic events and you need low latency. In a system with high throughput like ours, poll mode works fine.

For us, we're experimenting with pgcat and it'd doesn't yet support LISTEN/NOTIFY so this is a good fallback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants