Write to Postgres Before You Publish the Event
The order in which you commit a row and publish a real-time event determines whether your UI and your database can ever disagree. Always write first.
2 posts
The order in which you commit a row and publish a real-time event determines whether your UI and your database can ever disagree. Always write first.
Postgres tops out at a few hundred concurrent connections. Workers and serverless handlers want thousands. Transaction-mode pooling is the cheap fix — and a small set of constraints you have to live with.