4 ms·
Since each write is logged into a JetStream. The last writer will win for conflicting changes.
by maxpert 4y ago
Since each write is logged into a JetStream. The last writer will win for conflicting changes.
- lifty 4y agoBut since you don't have NATS message ordering (from different sources), it's possible that different DBs in the cluster will end up out of sync, right?
- maxpert 4y agoSo per-node there is an order of changes (read internals doc), and all of changes are sent to JS in that commit order. These changes when replayed will always eventually result in same values.
- lifty 4y agoI am talking about writes that come from 2 different nodes. If 2 different nodes, each making a different write at the exact same time, you would need some global ordering or consensus in order to order them. Otherwise you might end up in a different state on different nodes.