zlacker

[return to "River: A fast, robust job queue for Go and Postgres"]
1. sorent+1T[view] [source] 2023-11-20 19:26:13
>>bo0tzz+(OP)
> Work in a transaction has other benefits too. Postgres’ NOTIFY respects transactions, so the moment a job is ready to work a job queue can wake a worker to work it, bringing the mean delay before work happens down to the sub-millisecond level.

Oban just went the opposite way, removing the use of database triggers for insert notifications and moving them into the application layer instead[1]. The prevalence of poolers like pgbouncer, which prevent NOTIFY ever triggering, and the extra db load of trigger handling wasn't worth it.

[1]: https://github.com/sorentwo/oban/commit/7688651446a76d766f39...

◧◩
2. bgentr+Vf2[view] [source] 2023-11-21 02:50:53
>>sorent+1T
That makes a lot of sense, I've had the thought a few times that the NOTIFY overhead could get overwhelming in a high-throughput queue but haven't yet had an opportunity to verify this or experiment with a mechanism for reducing this overhead.
◧◩◪
3. joker6+Hg3[view] [source] 2023-11-21 11:33:48
>>bgentr+Vf2
Also pgbouncer.
[go to top]