New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set async pub ack inflight pending default to 4K, add StallWait option. #941
Conversation
js.go
Outdated
@@ -187,6 +187,9 @@ const ( | |||
|
|||
// Default number of retries | |||
DefaultPubRetryAttempts = 2 | |||
|
|||
// defaultAsyncPubAckInflight is the number of async pub acks inflight. | |||
defaultAsyncPubAckInflight = 4 * 1024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: For server change and max ack pending, I was going for 1024, but then realize that we maybe need to stop the kilo byte semantic for just numbers. So I set it to 1000 instead. But will see if Derek asks me to set to 1024 there, so don't update just yet :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do everything old school and power of 2, but let's do what we think is right going forward.
e7874d6
to
f474a03
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wallyqs I have merged the changes in the server for the consumer default max ack pending to 1,000 (not 1,024 - but was 20,000 so already that one was not a 1024 multiple). If we feel like it will be less of a "departure" from our default limits, you can keep 4*1024 instead of 4,000. Really up to you.
Signed-off-by: Waldemar Quevedo <wally@nats.io>
f474a03
to
dd3a012
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This makes async publishing stall wait customizable via the
StallWait
option, also sets the default stall pending default to 4K.