←back to thread

570 points davidgu | 1 comments | | HN request time: 0.616s | source
Show context
sleepy_keita ◴[] No.44527431[source]
LISTEN/NOTIFY was always a bit of a puzzler for me. Using it means you can't use things like pgbouncer/pgpool and there are so many other ways to do this, polling included. I guess it could be handy for an application where you know it won't scale and you just want a simple, one-dependency database.
replies(3): >>44527549 #>>44528158 #>>44528472 #
1. nightfly ◴[] No.44527549[source]
> I guess it could be handy for an application where you know it won't scale and you just want a simple, one-dependency database

That's where we use it at my work. We have host/networking deployment pipelines that used to have up to one minute latency on each step because each was ran on a one-minute cron. A short python script/service that handled the LISTENing + adding NOTIFYs when the next step was ready removed the latency and we'll never do enough for the load on the db to matter