-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Jetty 12 - Remove WriteFlusher.Listener #9778
Labels
Comments
@gregw thoughts? |
@sbordet the less listeners the better |
This issue has been automatically marked as stale because it has been a |
github-actions
bot
added
the
Stale
For auto-closed stale issues and pull requests
label
May 16, 2024
sbordet
added a commit
that referenced
this issue
May 24, 2024
This listener is not necessary anymore, as the min data rate checks have been moved to a StatisticsHandler.MinimumDataRateHandler. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet
added a commit
that referenced
this issue
May 29, 2024
* Fixes #9778 - Jetty 12 - Remove WriteFlusher.Listener. This listener is not necessary anymore, as the min data rate checks have been moved to a StatisticsHandler.MinimumDataRateHandler. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
github-project-automation
bot
moved this from 🏗 In progress
to ✅ Done
in Jetty 12.0.10 (FROZEN)
May 29, 2024
sbordet
added a commit
that referenced
this issue
Jul 19, 2024
sbordet
added a commit
that referenced
this issue
Jul 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jetty version(s)
12
Description
WriteFlusher.Listener
was introduced to compute the response data rate.This was necessary because for HTTP/2 or HTTP/3 we do not know often before hand how many bytes are flushed (because we use objects that are serialized just before hitting the network).
Furthermore wrapping with TLS complicates things because of the added wrapping.
However, I think it should now be possible to remove this (expensive) listener mechanism in favor of callbacks.
For HTTP/2, for example, a
[Control|Data]Entry
knows how many bytes it has generated, and upon completion of its write it can update the number of bytes written (for statistics), and check theminResponseDataRate
in the callback inHttpStreamOverHTTP2.send()
.This will only take into account clear-text writes (the overhead of a wrapping protocol such as TLS is not counted).
Note that we cannot move the bytes counting to
EndPoint
because for multiplexed protocols we want to check theminResponseDataRate
per-stream, not per-session.The text was updated successfully, but these errors were encountered: