Skip to content
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

Merged
merged 1 commit into from Mar 29, 2022

Conversation

wallyqs
Copy link
Member

@wallyqs wallyqs commented Mar 29, 2022

This makes async publishing stall wait customizable via the StallWait option, also sets the default stall pending default to 4K.

@wallyqs wallyqs requested a review from kozlovic March 29, 2022 22:05
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
Copy link
Member

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 :-)

Copy link
Member

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.

Copy link
Member

@kozlovic kozlovic left a 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>
Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 85.203% when pulling dd3a012 on js-pub-async-default into ce33b19 on main.

@wallyqs wallyqs merged commit e076b0d into main Mar 29, 2022
@wallyqs wallyqs deleted the js-pub-async-default branch March 29, 2022 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants