Postgres LISTEN/NOTIFY actually scales
1–10 of 99 posts
Re: Postgres LISTEN/NOTIFY actually scales
#2Since the correction apparently dates from May 8th, I think that a post from July 24th might want to acknowledge that the popular post asserting this feature doesn't (didn't?) scale was not made in bad faith or was even wrong about their claims at the time.
Re: Postgres LISTEN/NOTIFY actually scales
#3Re: Postgres LISTEN/NOTIFY actually scales
#4The ceiling of LISTEN/NOTIFY is small enough that you need to pay attention, and I personally like to have at least an order of magnitude of slack left over even after my most pessimistic load numbers are accounted for, but it's still plenty for a lot of projects, and the integration with the rest of the DB, its availability, its not being another service you have to devops, it's definitely not something that should be simply dismissed out of hand as an option. Even the original 2K/s number they cite is a lot of messages for some systems that are more properly measured in seconds per message.
Re: Postgres LISTEN/NOTIFY actually scales
#5Once you start down the "durable workflows" path, you start seeing them everywhere.
My latest experiments are treating individual emails as durable workflows, where you, the people you're communicating with, agents and tools like GitHub or Attio all take turns in the flow.
https://housecat.com/blog/gmail-durable-workflows-sandbox-vm
Re: Postgres LISTEN/NOTIFY actually scales
#6One way it explicitly doesn't scale (unless something has changed since I last checked and my quick search failed me) is the hard limit on 8000 bytes of data in a notification. If your notification doesn't make sense to exist as a row (where you can just give an ID), then that makes it hard to use. I had a web game and the events were transient descriptions of changes in state that didn't make sense to store in the d…
- Keeps messages O(1) so I can focus on scaling in the amount of notifications
- Tells whoever runs into this that,
- I didn't planned for arbitrarily large messages as they *might* otherwise grind performance to a halt.
- They *might* be misusing my notification systemRe: Postgres LISTEN/NOTIFY actually scales
#7"Scale" isn't a binary, it's a continuum. "Scales to 60K/s" can be 5 orders of magnitude more than one system needs and 5 orders of magnitude too small for another. Personally I'd knock the general "premature optimization" off the list of "most common developer errors" and put in its place "using techs with the wrong scaling factors". If you use something too small and you exceed its needs, the failure is obvious, bu…
Nitpick on an otherwise good post, but I don’t think there are very many 6billion RPS systems out there, and those that do exist are almost certainly using bespoke, purpose-built tools
Re: Postgres LISTEN/NOTIFY actually scales
#8Re: Postgres LISTEN/NOTIFY actually scales
#9It does seem interesting, and possibly welcome if there were a configuration option or even a way to set individual notifies as serialized or not.
Re: Postgres LISTEN/NOTIFY actually scales
#10If I understnad right, they are saying it scales (to theri needs) with a custom patch to pg changing their semantics, right? It does seem interesting, and possibly welcome if there were a configuration option or even a way to set individual notifies as serialized or not.