Active-active, eventually consistent replication for JetStream? #3866
Replies: 3 comments 3 replies
-
You can have streams I havnt tried this but you might combine this with cluster-unique mappings so each cluster can publish to the same subject and get it written to nearest available one magically. |
Beta Was this translation helpful? Give feedback.
-
If you only want 2 streams, you can source them from one another as long as the subject spaces to not overlap. So imagine you have two streams, A and B. Let's say the subject they listen on collectively is So stream A will have subjects Stream A will source from stream B from filtered subject The last customization could be that when a user connects to a certain node that house stream A, they inherit a subject mapping that maps This way the app simply sends to ORDERS.CREATED.123 and the message is stored in the local stream but then asynchronously stored in the other stream as well. |
Beta Was this translation helpful? Give feedback.
-
KV mirrors and sources are possible but will o let wkrk for your case in next major server reader. Object not today. You can use a normal stream in a KV-like manner but for object I don’t think it’s a good fit. |
Beta Was this translation helpful? Give feedback.
-
Hi NATS team! :)
The product I'm building (https://reflame.app) has a bunch of use cases that require global replication and are very sensitive to local write latency, so I've built them on top of a bunch of different tech that allows for "fast" local writes (i.e. no need to wait for ~300ms+ for global consensus) and eventually consistent global replication, namely DynamoDB for app state, S3 for binary blobs, KeyDB for caching, etc.
I've been following the development of NATS for a while, and I absolutely love the idea of unifying these use cases under the same tech with NATS JetStream and the KV/Object store abstractions, but all the replication approaches I could find in the docs seems to be either:
or
If I missed something and this in fact possible, I'd really appreciate some pointers on how to set it up! Cheers!
Beta Was this translation helpful? Give feedback.
All reactions