Merge pull request #4182 from eclipse/jetty-9.4.x-4142-RateControl

Issue #4142 - module config for http2 maxSettingsKeys and RateControl
This commit is contained in:
Simone Bordet 2019-10-15 13:00:26 +02:00 committed by GitHub
commit 83185334e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 0 deletions

View File

@ -39,6 +39,11 @@ public class WindowRateControl implements RateControl
private final int maxEvents;
private final long window;
public static WindowRateControl fromEventsPerSecond(int maxEvents)
{
return new WindowRateControl(maxEvents, Duration.ofSeconds(1));
}
public WindowRateControl(int maxEvents, Duration window)
{
this.maxEvents = maxEvents;

View File

@ -9,6 +9,12 @@
<Set name="maxConcurrentStreams"><Property name="jetty.http2.maxConcurrentStreams" deprecated="http2.maxConcurrentStreams" default="128"/></Set>
<Set name="initialStreamRecvWindow"><Property name="jetty.http2.initialStreamRecvWindow" default="524288"/></Set>
<Set name="initialSessionRecvWindow"><Property name="jetty.http2.initialSessionRecvWindow" default="1048576"/></Set>
<Set name="maxSettingsKeys"><Property name="jetty.http2.maxSettingsKeys" default="64"/></Set>
<Set name="rateControl">
<Call class="org.eclipse.jetty.http2.parser.WindowRateControl" name="fromEventsPerSecond">
<Arg type="int"><Property name="jetty.http2.rateControl.maxEventsPerSecond" default="20"/></Arg>
</Call>
</Set>
</New>
</Arg>
</Call>

View File

@ -8,6 +8,12 @@
<Arg name="config"><Ref refid="httpConfig"/></Arg>
<Set name="maxConcurrentStreams"><Property name="jetty.http2c.maxConcurrentStreams" deprecated="http2.maxConcurrentStreams" default="1024"/></Set>
<Set name="initialStreamRecvWindow"><Property name="jetty.http2c.initialStreamRecvWindow" default="65535"/></Set>
<Set name="maxSettingsKeys"><Property name="jetty.http2.maxSettingsKeys" default="64"/></Set>
<Set name="rateControl">
<Call class="org.eclipse.jetty.http2.parser.WindowRateControl" name="fromEventsPerSecond">
<Arg type="int"><Property name="jetty.http2.rateControl.maxEventsPerSecond" default="20"/></Arg>
</Call>
</Set>
</New>
</Arg>
</Call>

View File

@ -29,3 +29,9 @@ etc/jetty-http2.xml
## Initial session receive window (client to server)
# jetty.http2.initialSessionRecvWindow=1048576
## The max number of keys in all SETTINGS frames
# jetty.http2.maxSettingsKeys=64
## Max number of bad frames and pings per second
# jetty.http2.rateControl.maxEventsPerSecond=20

View File

@ -24,3 +24,9 @@ etc/jetty-http2c.xml
## Initial stream receive window (client to server)
# jetty.http2c.initialStreamRecvWindow=65535
## The max number of keys in all SETTINGS frames
# jetty.http2.maxSettingsKeys=64
## Max number of bad frames and pings per second
# jetty.http2.rateControl.maxEventsPerSecond=20