3 ms·
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 S
by simonw 4y ago
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.
- xyzzy_plugh 4y agoThat 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.
- oulu2006 4y agoIt's quite a common pattern, we did the same thing years ago using RMQ to achieve eventually consistent cache invalidation.