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

[ADDED] Option that disables fast producer stalling (drops msg instead) #6500

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

kozlovic
Copy link
Member

Normally, when a producer detects that one of the consumer of a message is falling behind, it will stall. Which means that if a message has 2 consumers and the first is "slow", then it will affect the timely delivery to the second consumer.

With the new option no_fast_producer_stall=true, the server will simply drop a message destined to a consumer that would have caused the producer to stall. The message is still delivered to consumers that are not falling behind.

The option can be config-reload'ed and if a message is dropped due to fast-producer/slow-consumer, and the message was traced (with deliver option), then the message trace egress event will have an error indicating the reason why the message was not delivered.

Resolves #6413

Signed-off-by: Ivan Kozlovic [email protected]

Normally, when a producer detects that one of the consumer of a message
is falling behind, it will stall. Which means that if a message has
2 consumers and the first is "slow", then it will affect the timely
delivery to the second consumer.

With the new option `no_fast_producer_stall=true`, the server will
simply drop a message destined to a consumer that would have caused
the producer to stall. The message is still delivered to consumers
that are not falling behind.

The option can be config-reload'ed and if a message is dropped
due to fast-producer/slow-consumer, and the message was traced
(with deliver option), then the message trace egress event will
have an error indicating the reason why the message was not
delivered.

Resolves #6413

Signed-off-by: Ivan Kozlovic <[email protected]>
@kozlovic kozlovic requested a review from a team as a code owner February 11, 2025 23:57
Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@derekcollison derekcollison merged commit b848ef1 into main Feb 12, 2025
5 checks passed
@derekcollison derekcollison deleted the fix_6413 branch February 12, 2025 01:13
neilalexander added a commit that referenced this pull request Feb 12, 2025
Includes the following:

- #6492
- #6494
- #6498
- #6500
- #6499
- #6502

Signed-off-by: Neil Twigg <[email protected]>
kozlovic added a commit that referenced this pull request Feb 12, 2025
Consolidated the 2 tests into 1, reducing run time from 7-15 sec
down to less than 0.4 second and memory usage from 1GB+ down to
18M or so (which is likely not even the usage for the test itself
but the sublist tests).

Signed-off-by: Ivan Kozlovic <[email protected]>
kozlovic added a commit to kozlovic/nats.docs that referenced this pull request Feb 13, 2025
derekcollison added a commit that referenced this pull request Feb 13, 2025
Consolidated the 2 tests into 1, reducing run time from 7-15 sec down to
less than 0.4 second and memory usage from 1GB+ down to 18M or so (which
is likely not even the usage for the test itself but the sublist tests).

Signed-off-by: Ivan Kozlovic <[email protected]>
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.

Making the producer stalling configurable
3 participants