Earlier quoted context omitted.
Nah this isn't mean at all. I think this is the correct takeaway. I actually felt like I understood how the system worked and it wasn't that difficult for me, but I also understood how, as we were adding engineers who were all very under water, the idea of learning our queueing system to modify a core feature it powered seemed like a big mental context switch (bigger than it actually was). I noted this in another com…
Also the results given it the article are still worse than redis with zero work and no risk of breaking later, both in nb of req and latency. And you can move redis to another server next later if needed to split the db and notification load.
Postgres LISTEN/NOTIFY actually scales
81–90 of 99 posts
Re: Postgres LISTEN/NOTIFY actually scales
#82Earlier quoted context omitted.
The highest I could think of is WhatsApp, which gets ~1.6 million RPS on average, and they use MQTT
I used to scrape Meta sites at over 200k steady rps for a couple of years, all by myself. They did send lawyers to my door in the end though. Someone had forgot IPv6 rate limit bucketing :)
Re: Postgres LISTEN/NOTIFY actually scales
#83Re: Postgres LISTEN/NOTIFY actually scales
#84One 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…
Could you not send a message that pointed to the state that changed in a non-row-specific way?
Re: Postgres LISTEN/NOTIFY actually scales
#85Just sharing a data point and experience. We had a lot of success with LISTEN/NOTIFY when we paired it with a Rust graphql subscription broker. 10s of thousands of subscriptions, but only 3 or 4 LISTEN connections (one for each host). All changes would be pushed out to all hosts, who would each manage the actual user subscriptions and choose what to actually publish. This worked super well. In general, moving from hu…
I‘m interested, which graphql library for Rust can you recommend?
Re: Postgres LISTEN/NOTIFY actually scales
#86Just sharing a data point and experience. We had a lot of success with LISTEN/NOTIFY when we paired it with a Rust graphql subscription broker. 10s of thousands of subscriptions, but only 3 or 4 LISTEN connections (one for each host). All changes would be pushed out to all hosts, who would each manage the actual user subscriptions and choose what to actually publish. This worked super well. In general, moving from hu…
I‘m interested, which graphql library for Rust can you recommend?
Re: Postgres LISTEN/NOTIFY actually scales
#87Earlier quoted context omitted.
For reference, I've seen Visa marketing materials that suggest their network can do ~70k TPS. There are not very many systems one could conceive of that could do useful work 1/s for ~every human on the planet.
Hm, what am I not getting? One transaction per second for every human on the planet would be 8 billion TPS, not 70k, no?
Re: Postgres LISTEN/NOTIFY actually scales
#88Earlier quoted context omitted.
> 5 orders of magnitude too small for another. 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
Maybe there would be more if it were more straightforward to do so?
What are these, TCP packets?
Re: Postgres LISTEN/NOTIFY actually scales
#89Earlier quoted context omitted.
Hm, what am I not getting? One transaction per second for every human on the planet would be 8 billion TPS, not 70k, no?
Yes, the point is it's difficult to even conceive of something that needs anywhere near the billions of TPS, because generally speaking, humans are not doing something with a computer once per second on average. Far lower. I might use my credit card less than once per day on average.
Re: Postgres LISTEN/NOTIFY actually scales
#90I once was the CTO of a company that serviced about 100k requests per day across all our services. We grew to millions and eventually 10's of millions, but, somewhere along the way, an engineer on our team decided he wanted to build a queue off LISTEN/NOTIFY semantics in order to take advantage of strong consistency with the rest of our data model, which seemed reasonable given LISTEN/NOTIFY is not that hard to under…