Sharding Jetstream #3495
-
First and foremost I am in instant love with the project. I have been implementing a Marmot and one of things I was spending a lot of time on was distributed reliable streams of change log. While NATS solve most of my problems, I am still struggling with two things:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
If you want only jetstream to receive a message then you can restrict the subject (authz) for all other users/apps. The leader of the stream receives the message directly from the app and is in charge of replicating it to the followers. Once a quorum of replies has been received by the leader it will respond to the application. In terms of sharding, are you sure you need it? A single stream, even an R3 can run ~250k msgs/sec with proper hardware and setup. If you feel you do, you can have messages in your account be sharded automatically, but the streams would need to be setup to receive this partitioned messages. I thought docs had that but a simple search could not find it so looping in @jnmoyne and @gcolliso and @bruth. Search was |
Beta Was this translation helpful? Give feedback.
If you want only jetstream to receive a message then you can restrict the subject (authz) for all other users/apps.
The leader of the stream receives the message directly from the app and is in charge of replicating it to the followers. Once a quorum of replies has been received by the leader it will respond to the application.
In terms of sharding, are you sure you need it? A single stream, even an R3 can run ~250k msgs/sec with proper hardware and setup. If you feel you do, you can have messages in your account be sharded automatically, but the streams would need to be setup to receive this partitioned messages.
I thought docs had that but a simple search could not find it so looping in @…