News for hackers. Stuff that matters.
Re:The Wonders of Postgres Logical Decoding Messages by simonw on Friday March 31, 2023 @06:57PM (#35394903)
I remember hearing years ago that Facebook used a trick like this for cache invalidation: they would write custom "invalidate cache X" messages (maybe even as SQL comments?) into their MySQL replication streams that fanned out to multiple data centers, such that a data center would know to clear a cached record out of its local memcached cluster when the relevant MySQL rows were updated.
Re:The Wonders of Postgres Logical Decoding Messages by xyzzy_plugh on Saturday April 01, 2023 @07:36PM (#35405353)
That doesn't seem particularly novel. A replication stream by definition announces changes to data, simply listening to it gives the listener the full story.

Through a certain lens, a read replica is just a cache.

Re:The Wonders of Postgres Logical Decoding Messages by oulu2006 on Saturday April 01, 2023 @09:06PM (#35405995)
It's quite a common pattern, we did the same thing years ago using RMQ to achieve eventually consistent cache invalidation.