This is an automated email from the ASF dual-hosted git repository. robertlazarski pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
commit 876e806a23dfcb6607fa3aac3b36e848fae412f7 Author: Robert Lazarski <[email protected]> AuthorDate: Mon May 4 09:42:37 2026 -1000 AXIS2-6103 Fix remaining 65536 initialWindowSize across all HTTP/2 docs Update all config examples and tables in WildFly, Tomcat, Spring Boot, and integration guides to use initialWindowSize=2097152 (2MB) instead of 65536 (64KB). The 64KB value caused ~156 WINDOW_UPDATE round-trips per stream for 10MB responses. Server-side buffer/flush settings (buffer-size, streamingBufferSize, moshiStreamingBufferSize) remain at 64KB — those are serialization flush intervals, not flow-control windows. --- src/site/xdoc/docs/http2-integration-guide.xml | 4 ++-- src/site/xdoc/docs/http2-transport-additions.xml | 2 +- .../docs/json-springboot-tomcat11-userguide.xml | 2 +- src/site/xdoc/docs/json-springboot-userguide.xml | 2 +- .../xdoc/docs/tomcat-http2-integration-guide.xml | 6 ++--- .../xdoc/docs/wildfly-http2-integration-guide.xml | 26 +++++++++++++--------- 6 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/site/xdoc/docs/http2-integration-guide.xml b/src/site/xdoc/docs/http2-integration-guide.xml index 11cadc8aaf..548d0202b0 100644 --- a/src/site/xdoc/docs/http2-integration-guide.xml +++ b/src/site/xdoc/docs/http2-integration-guide.xml @@ -314,7 +314,7 @@ production-ready intelligent defaults. <strong>Minimal configuration required!</ <parameter name="PROTOCOL">HTTP/2.0</parameter> <!-- Optional: Override intelligent defaults if required --> <parameter name="maxConcurrentStreams">100</parameter> <!-- Default: 100 --> - <parameter name="initialWindowSize">65536</parameter> <!-- Default: 65536 (64KB) --> + <parameter name="initialWindowSize">2097152</parameter> <!-- Default: 2097152 (2MB: avoids flow-control round trips) --> <parameter name="maxConnectionsTotal">50</parameter> <!-- Default: 50 --> <parameter name="connectionTimeout">30000</parameter> <!-- Default: 30000 (30s) --> <parameter name="responseTimeout">300000</parameter> <!-- Default: 300000 (5m) --> @@ -355,7 +355,7 @@ msgContext.setProperty("FLOW_CONTROL_WINDOW_SIZE", 2097152); // 2MB maxConcurrentStreams = 100 (Memory-constrained: vs library default 1000) maxConnectionsTotal = 50 (Memory-constrained: vs library default 100) maxConnectionsPerRoute = 10 (Route-specific limit: vs library default 20) -initialWindowSize = 65536 (64KB optimized for large JSON payloads) +initialWindowSize = 2097152 (2MB: avoids flow-control round trips) streamingBufferSize = 65536 (64KB chunks for 50MB+ processing) connectionKeepAliveTime = 300000 (5 minutes balanced timeout) responseTimeout = 300000 (5 minutes for large payload processing) diff --git a/src/site/xdoc/docs/http2-transport-additions.xml b/src/site/xdoc/docs/http2-transport-additions.xml index 5b4a11670b..de54bfe23f 100644 --- a/src/site/xdoc/docs/http2-transport-additions.xml +++ b/src/site/xdoc/docs/http2-transport-additions.xml @@ -457,7 +457,7 @@ options.setProperty("HTTP2_MEMORY_OPTIMIZATION", Boolean.TRUE); <transportSender name="h2" class="org.apache.axis2.transport.h2.impl.httpclient5.H2TransportSender"> <parameter name="PROTOCOL">HTTP/2.0</parameter> <parameter name="maxConcurrentStreams">100</parameter> - <parameter name="initialWindowSize">65536</parameter> + <parameter name="initialWindowSize">2097152</parameter> <parameter name="http2FallbackEnabled">true</parameter> </transportSender> </pre> diff --git a/src/site/xdoc/docs/json-springboot-tomcat11-userguide.xml b/src/site/xdoc/docs/json-springboot-tomcat11-userguide.xml index da5bdb3543..39a03892cb 100644 --- a/src/site/xdoc/docs/json-springboot-tomcat11-userguide.xml +++ b/src/site/xdoc/docs/json-springboot-tomcat11-userguide.xml @@ -418,7 +418,7 @@ sender configuration to your axis2.xml file:</p> class="org.apache.axis2.transport.h2.impl.httpclient5.H2TransportSender"> <parameter name="PROTOCOL">HTTP/2.0</parameter> <parameter name="maxConcurrentStreams">100</parameter> - <parameter name="initialWindowSize">65536</parameter> + <parameter name="initialWindowSize">2097152</parameter> <parameter name="serverPushEnabled">false</parameter> <parameter name="connectionTimeout">30000</parameter> <parameter name="responseTimeout">300000</parameter> diff --git a/src/site/xdoc/docs/json-springboot-userguide.xml b/src/site/xdoc/docs/json-springboot-userguide.xml index 907e0d7006..301550c381 100644 --- a/src/site/xdoc/docs/json-springboot-userguide.xml +++ b/src/site/xdoc/docs/json-springboot-userguide.xml @@ -319,7 +319,7 @@ sender configuration to your axis2.xml file:</p> class="org.apache.axis2.transport.h2.impl.httpclient5.H2TransportSender"> <parameter name="PROTOCOL">HTTP/2.0</parameter> <parameter name="maxConcurrentStreams">100</parameter> - <parameter name="initialWindowSize">65536</parameter> + <parameter name="initialWindowSize">2097152</parameter> <parameter name="serverPushEnabled">false</parameter> <parameter name="connectionTimeout">30000</parameter> <parameter name="responseTimeout">300000</parameter> diff --git a/src/site/xdoc/docs/tomcat-http2-integration-guide.xml b/src/site/xdoc/docs/tomcat-http2-integration-guide.xml index 1ac7bf40c1..5a3f1cf2b9 100644 --- a/src/site/xdoc/docs/tomcat-http2-integration-guide.xml +++ b/src/site/xdoc/docs/tomcat-http2-integration-guide.xml @@ -92,7 +92,7 @@ <!-- ALIGNED: Buffer sizes match Enhanced Moshi H2 --> upgradeAsyncTimeout="300000" <!-- HTTP/2 upgrade timeout --> http2MaxConcurrentStreams="200" <!-- High concurrency --> - http2InitialWindowSize="65536" <!-- 64KB - matches Enhanced Moshi H2 --> + http2InitialWindowSize="2097152" <!-- 2MB: avoids flow-control round trips --> http2MaxFrameSize="32768" <!-- 32KB - aligned with buffer management --> http2MaxHeaderTableSize="8192" <!-- 8KB header table --> http2MaxHeaderListSize="32768" <!-- 32KB header list --> @@ -144,7 +144,7 @@ <table border="1"> <tr><th>Parameter</th><th>Tomcat 11 Value</th><th>Optimization Purpose</th><th>WildFly Equivalent</th></tr> <tr><td><strong>http2MaxConcurrentStreams</strong></td><td>200</td><td>High multiplexing for large JSON APIs</td><td>http2-max-concurrent-streams="200"</td></tr> -<tr><td><strong>http2InitialWindowSize</strong></td><td>65536 (64KB)</td><td>Aligned with Enhanced Moshi H2 buffers</td><td>http2-initial-window-size="65536"</td></tr> +<tr><td><strong>http2InitialWindowSize</strong></td><td>2097152 (2MB)</td><td>Avoids flow-control round trips on large responses</td><td>http2-initial-window-size="2097152"</td></tr> <tr><td><strong>http2MaxFrameSize</strong></td><td>32768 (32KB)</td><td>Optimal for JSON streaming</td><td>http2-max-frame-size="32768"</td></tr> <tr><td><strong>maxPostSize</strong></td><td>104857600 (100MB)</td><td>Large JSON payload support</td><td>max-post-size="104857600"</td></tr> <tr><td><strong>connectionTimeout</strong></td><td>300000 (5min)</td><td>Large payload processing time</td><td>no-request-timeout="300000"</td></tr> @@ -191,7 +191,7 @@ <!-- Coordination with Tomcat 11 HTTP/2 --> <parameter name="maxConcurrentStreams">200</parameter> <!-- Matches Tomcat --> - <parameter name="initialWindowSize">65536</parameter> <!-- 64KB - matches Tomcat --> + <parameter name="initialWindowSize">2097152</parameter> <!-- 2MB: avoids flow-control round trips --> <parameter name="maxFrameSize">32768</parameter> <!-- 32KB - matches Tomcat --> <parameter name="maxConnectionsTotal">50</parameter> <parameter name="maxConnectionsPerRoute">10</parameter> diff --git a/src/site/xdoc/docs/wildfly-http2-integration-guide.xml b/src/site/xdoc/docs/wildfly-http2-integration-guide.xml index d7adef6f23..0009887a70 100644 --- a/src/site/xdoc/docs/wildfly-http2-integration-guide.xml +++ b/src/site/xdoc/docs/wildfly-http2-integration-guide.xml @@ -200,10 +200,16 @@ large-payload workloads. See <td>✅ WildFly manages 128 concurrent HTTP/2 streams, Moshi H2 handles async processing for large payloads</td> </tr> <tr> - <td><strong>Buffer Management</strong></td> - <td><code>http2-initial-window-size="65535"</code></td> + <td><strong>Flow Control Window</strong></td> + <td><code>http2-initial-window-size="2097152"</code></td> + <td><code>initialWindowSize="2097152"</code> (in axis2.xml)</td> + <td>✅ 2MB window prevents round-trip latency on large responses</td> +</tr> +<tr> + <td><strong>Streaming Flush Buffer</strong></td> + <td><code>buffer-size="65536"</code></td> <td><code>moshiStreamingBufferSize="65536"</code></td> - <td>✅ Aligned buffer sizes prevent memory waste and optimize streaming</td> + <td>✅ 64KB server-side flush interval — good TTFB, independent of flow-control window</td> </tr> <tr> <td><strong>Large Payload Handling</strong></td> @@ -243,7 +249,7 @@ large-payload workloads. See enable-http2="true" http2-enable-push="false" http2-header-table-size="4096" <!-- Conservative headers --> - http2-initial-window-size="65536" <!-- Matches Enhanced Moshi H2 buffer --> + http2-initial-window-size="2097152" <!-- 2MB: avoids flow-control round trips --> http2-max-concurrent-streams="100" <!-- Coordinated with transport-h2 --> http2-max-frame-size="32768" <!-- ALIGNED: Matches buffer pool --> http2-max-header-list-size="16384" <!-- Sufficient for JSON APIs --> @@ -305,10 +311,10 @@ Complete HTTP/2 + JSON Optimization Stack: </tr> <tr> <td><strong>Window Sizes</strong></td> - <td><code>http2-initial-window-size="65536"</code></td> - <td><code>initialWindowSize="65536"</code></td> + <td><code>http2-initial-window-size="2097152"</code></td> + <td><code>initialWindowSize="2097152"</code></td> <td><code>AsyncProcessingThreshold="1MB"</code></td> - <td>✅ <strong>COORDINATED</strong>: 64KB windows, 1MB async threshold</td> + <td>✅ <strong>TUNED</strong>: 2MB flow-control windows, 1MB async threshold</td> </tr> <tr> <td><strong>Stream Limits</strong></td> @@ -390,7 +396,7 @@ Complete HTTP/2 + JSON Optimization Stack: enable-http2="true" http2-enable-push="false" http2-header-table-size="4096" - http2-initial-window-size="65536" <!-- Matches transport-h2 + Moshi --> + http2-initial-window-size="2097152" <!-- 2MB: avoids flow-control round trips --> http2-max-concurrent-streams="100" <!-- Matches transport-h2 limit --> http2-max-frame-size="32768" <!-- ALIGNED: Matches buffer pool --> http2-max-header-list-size="16384" @@ -406,7 +412,7 @@ Complete HTTP/2 + JSON Optimization Stack: enable-http2="true" http2-enable-push="false" http2-header-table-size="4096" - http2-initial-window-size="65536" <!-- Matches transport-h2 + Moshi --> + http2-initial-window-size="2097152" <!-- 2MB: avoids flow-control round trips --> http2-max-concurrent-streams="100" <!-- Matches transport-h2 limit --> http2-max-frame-size="32768" <!-- ALIGNED: Matches buffer pool --> http2-max-header-list-size="16384" @@ -464,7 +470,7 @@ Complete HTTP/2 + JSON Optimization Stack: <!-- Coordination with WildFly HTTP/2 --> <parameter name="maxConcurrentStreams">100</parameter> <!-- Matches WildFly --> - <parameter name="initialWindowSize">65536</parameter> <!-- Matches WildFly + Moshi --> + <parameter name="initialWindowSize">2097152</parameter> <!-- 2MB: avoids flow-control round trips --> <parameter name="maxConnectionsTotal">50</parameter> <parameter name="maxConnectionsPerRoute">10</parameter> <parameter name="connectionTimeout">30000</parameter>
