Jetstreams publisher perfomance decreases rapidly with large number of parallel consumers. Publisher throughput decreases by 50 times for 100 consumers #6274
Unanswered
mranish592
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview
We have been using the the nats bench CLI tool for benchmarking the performance of NATS Jetstream over different variables.
In our use-case, we require 100K ephemeral parallel consumers subscribed to the stream. The reason for going with jetstream and ephemeral consumer is that, we are streaming real-time data to our browser application and it should support the capability of message replay in order to get the latest state for all the subscribed subjects before loading up.
After running the benchmarks we saw publisher throughput is decreasing rapidly when the number of parallel consumers is increased.
We are running the below command to test run the benchmarks for 10KB payloads and 100K message count. The below command is supposed to create <sub> # of ephemeral consumers and <pub> # parallel publishers
nats bench bar --js --pub <pub> --sub <sub> --size 10000 --msgs 100000 --maxbytes=50GB --no-progress --purge
Results
Here is the output for different values of pub and sub:
Instance: AWS EC2 m5.2xlarge (8 core CPU, 32 GB RAM)
How to replicate the test
nats-server -c server.conf --js
Things we tried and our observations
Expected behaviour
The publisher throughput not be affected significantly on increasing the number of parallel consumers.
Questions
@derekcollison Can you please give some clarity on the below questions?
Beta Was this translation helpful? Give feedback.
All reactions