From de0e433e5a6289328b3a128f7c4a1a9747ec84e1 Mon Sep 17 00:00:00 2001 From: Bjørn Christian Seime Date: Fri, 7 Jul 2023 14:34:27 +0200 Subject: Use large initial windows --- .../src/main/java/ai/vespa/feed/client/impl/JettyCluster.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vespa-feed-client') diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java index 4f919167520..261454c710f 100644 --- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java +++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java @@ -119,6 +119,10 @@ class JettyCluster implements Cluster { connector.setSslContextFactory(clientSslCtxFactory); HTTP2Client h2Client = new HTTP2Client(connector); h2Client.setMaxConcurrentPushedStreams(b.maxStreamsPerConnection); + // Set the HTTP/2 flow control windows very large to cause TCP congestion instead of HTTP/2 flow control congestion. + int initialWindow = 128 * 1024 * 1024; + h2Client.setInitialSessionRecvWindow(initialWindow); + h2Client.setInitialStreamRecvWindow(initialWindow); HttpClientTransportOverHTTP2 transport = new HttpClientTransportOverHTTP2(h2Client); transport.setConnectionPoolFactory(dest -> { MultiplexConnectionPool pool = new MultiplexConnectionPool( -- cgit v1.2.3