Postgres is a great pub/sub and job server (2019)
Author here! A few updates since this was published two years ago:<p>- The service mentioned (now called <a href="https://webapp.io" rel="nofollow">https://webapp.io</a> ) eventually made it into YC (S20) and still uses postgres as its pub/sub implementation, doing hundreds of thousands of messages per day. The postgres instance now runs on 32 cores and 128gb of memory and has scaled well.<p>- We bolstered Postgres's PUBLISH with Redis pub/sub for high traffic code paths, but it's been nice having ACID guarantees as the default for less popular paths (e.g., webhook handling)<p>- This pattern only ever caused one operational incident, where a transaction held a lock which caused the notification queue to start growing, and eventually (silently) stop sending messages, starting postgres with statement_timeout=(a few days) was enough to solve this<p>Previous discussion: <a href="https://news.ycombinator.com/item?id=21484215" rel="nofollow">https://news.ycombinator.com/item?id=21484215</a><p>Happy to answer any questions!