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

Bounded in-flight dispatch requests in unordered delivery for back-pressure #1750

Merged
merged 1 commit into from Jan 18, 2022

Conversation

pierDipi
Copy link
Member

@pierDipi pierDipi commented Jan 17, 2022

Vert.x auto-subscribe and handling of records might grow
unbounded, and it is particularly evident when the consumer
is slow to consume messages.

To apply backpressure, we need to bound the number of outbound
in-flight requests, so we need to manually poll for new records
as we dispatch them to the subscriber service.

The maximum number of outbound in-flight requests is already configurable
with the consumer parameter max.poll.records, and it's critical to
control the memory consumption of the dispatcher.

Signed-off-by: Pierangelo Di Pilato pierdipi@redhat.com

Part of #1732

Release Note

Apply back-pressure by limiting the number of in-flight dispatch requests in the unordered event consumption 

Vert.x auto-subscribe and handling of records might grow
unbounded, and it is particularly evident when the consumer
is slow to consume messages.

To apply backpressure, we need to bound the number of outbound
in-flight requests, so we need to manually poll for new records
as we dispatch them to the subscriber service.

The maximum number of outbound in-flight requests is already configurable
with the consumer parameter `max.poll.records`, and it's critical to
control the memory consumption of the dispatcher.

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
@knative-prow-robot knative-prow-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. area/data-plane approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 17, 2022
@codecov
Copy link

codecov bot commented Jan 17, 2022

Codecov Report

Merging #1750 (dfdf6b5) into main (3f3f37c) will increase coverage by 0.07%.
The diff coverage is 88.88%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1750      +/-   ##
============================================
+ Coverage     66.35%   66.42%   +0.07%     
- Complexity      611      617       +6     
============================================
  Files           129      129              
  Lines          5266     5283      +17     
  Branches        176      177       +1     
============================================
+ Hits           3494     3509      +15     
- Misses         1486     1488       +2     
  Partials        286      286              
Flag Coverage Δ
java-unittests 82.25% <88.88%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...tcher/impl/consumer/UnorderedConsumerVerticle.java 91.30% <88.88%> (-8.70%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f3f37c...dfdf6b5. Read the comment docs.

@pierDipi pierDipi changed the title [WIP] Bounded in-flight dispatch requests in unordered delivery for back-pressure Bounded in-flight dispatch requests in unordered delivery for back-pressure Jan 17, 2022
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 17, 2022
Copy link
Contributor

@matzew matzew left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

good call to customize this.

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 18, 2022
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: matzew, pierDipi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@matzew
Copy link
Contributor

matzew commented Jan 18, 2022

/retest

@knative-prow-robot knative-prow-robot merged commit 858899c into knative-extensions:main Jan 18, 2022
@pierDipi
Copy link
Member Author

pierDipi commented Feb 1, 2022

/cherry-pick release-1.1

@pierDipi
Copy link
Member Author

pierDipi commented Feb 1, 2022

/cherry-pick release-1.0

@knative-prow-robot
Copy link
Contributor

@pierDipi: new pull request created: #1838

In response to this:

/cherry-pick release-1.1

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot
Copy link
Contributor

@pierDipi: new pull request created: #1839

In response to this:

/cherry-pick release-1.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/data-plane lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants