This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push: new 2698cfb Reduce overhead count by 2 rather than 1 for non-overhead frames 2698cfb is described below commit 2698cfb178b81513276e2093bf2a19e04cca1b90 Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Jun 14 22:12:46 2021 +0100 Reduce overhead count by 2 rather than 1 for non-overhead frames This means that the overhead count for a well-behaved conenction should trend downwards over time. --- java/org/apache/coyote/http2/Http2Protocol.java | 2 +- webapps/docs/changelog.xml | 7 +++++++ webapps/docs/config/http2.xml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/java/org/apache/coyote/http2/Http2Protocol.java b/java/org/apache/coyote/http2/Http2Protocol.java index 230f8f0..e3028f8 100644 --- a/java/org/apache/coyote/http2/Http2Protocol.java +++ b/java/org/apache/coyote/http2/Http2Protocol.java @@ -58,7 +58,7 @@ public class Http2Protocol implements UpgradeProtocol { static final int DEFAULT_OVERHEAD_COUNT_FACTOR = 1; // Not currently configurable. This makes the practical limit for // overheadCountFactor to be 2. - static final int DEFAULT_OVERHEAD_REDUCTION_FACTOR = -1; + static final int DEFAULT_OVERHEAD_REDUCTION_FACTOR = -2; static final int DEFAULT_OVERHEAD_CONTINUATION_THRESHOLD = 1024; static final int DEFAULT_OVERHEAD_DATA_THRESHOLD = 1024; static final int DEFAULT_OVERHEAD_WINDOW_UPDATE_THRESHOLD = 1024; diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index bbe0564..f98333f 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -127,6 +127,13 @@ overhead count that Tomcat uses to detect and close potentially malicious connections. (markt) </add> + <update> + Many HTTP/2 requests from browsers will trigger one overhead frame and + one non-overhead frame. Change the overhead calculation so that a + non-overhead frame reduces the current overhead count by 2 rather than + 1. This means that, over time, the overhead count for a well-behaved + connection will trend downwards. (markt) + </update> </changelog> </subsection> <subsection name="Other"> diff --git a/webapps/docs/config/http2.xml b/webapps/docs/config/http2.xml index f1b4538..9e5a148 100644 --- a/webapps/docs/config/http2.xml +++ b/webapps/docs/config/http2.xml @@ -136,7 +136,7 @@ <attribute name="overheadCountFactor" required="false"> <p>The factor to apply when counting overhead frames to determine if a connection has too high an overhead and should be closed. The overhead - count starts at <code>-10</code>. The count is decreased for each + count starts at <code>-10</code>. The count is decreased by 2 for each data frame sent or received and each headers frame received. The count is increased by the <code>overheadCountFactor</code>for each setting received, priority frame received and ping received. If the overhead count --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org