Performance using a single stream and MaxPending of 256
norbjd opened this issue · comments
Problem
(I have not experienced a problem yet. I am pretty new to NATS, so excuse me if my question is obvious.)
Looking at the code, I'm worried about scaling; precisely about how many messages can be processed per second. In my use case, the order of magnitude is many thousands/second (to give an upper bound, let's say with a max of 100'000 messages/second).
My question is about this specific part of the code:
As far as I understand and from my tests, I have seen that there is only one stream created (K-ORDERS
), with a restriction of 256
messages sent at the same time. I'm wondering if this is enough to handle a maximum of 100'000 messages/second. If I understand correctly the comment above MaxPending
, 256
is the number of inflight messages at one time. I believe that it can be reached easily with 100'000 messages/second. What happens if that 256
number is reached? Are messages delayed?
It should be great to be able to customize MaxPending
value. Also, is it possible/necessary to define multiple streams?
Persona:
Which persona is this feature for?
System Operator
Thanks for your help! 🙏
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.