Replies: 2 comments 2 replies
-
Can you describe the state that is being read, the one you want locality for? Is it a file read? A Key Value pair? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Maybe consider using JetStream KV or Object store and have realtime mirrors on all the nodes. These can be configured to expire after a certain amount of time or when new entries are added. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a data processing application that runs in a kubernetes cluster that uses NATS Jetstream work queues and pull subscriptions. As it stands now the consumer that gets a message is relatively random (combination of round robin from NATS and timing of an open worker). I'm looking for a way to promote data locality, in this case when a message is published it would prefer to be read by a worker on the same node (so that a local cache would be used to read the results of the last step) but if there are no local workers available it could be pulled by a worker on another node.
I could publish to node specific topics (eg. work.{node name}) and have the stream read all the topics for the work queue but don't see a way to get it routed locally if possible without writing some sort of custom message broker to route the work around. Is there some existing functionality that could support a use case like this that I've missed?
Beta Was this translation helpful? Give feedback.
All reactions