3 ms·
I would assume the intended use-case is a "pseudo-sharded" cluster. In an actually-sharded cluster, some scheme (e.g. a hash ring) directs writes to particular
by derefr 3y ago
I would assume the intended use-case is a "pseudo-sharded" cluster.
In an actually-sharded cluster, some scheme (e.g. a hash ring) directs writes to particular shards, and so any given row only lives on one shard.
In a pseudo-sharded cluster, you still direct writes to different "shards" — but all the pseudo-shards also mirror each-other's data, so every pseudo-shard actually has a complete dataset. But each row is still only owned by one particular shard; when updating that row, you must update it through that shard. All the data not owned by the shard, should be treated as a read-only/immutable cache on that shard of the other shards' data.
Personally, though, if I were setting something like this up, rather than bi-di logical replication on a single table, I'd just partition the table with one partition per shard, and then have the "owning" shard be the publisher for that partition and the rest of the shards be subscribers for that partition. Same effect, much less implementation complexity and much less risk.
- simonw 3y agoThat sounds like a smart model for thinking about this, thanks.