There are many http2 upgrade protocol configurations for Tomcat (https://tomcat.apache.org/tomcat-9.0-doc/config/http2.html), currently, those cannot be configured via Spring Boot ServerProperties, we can use TomcatConnectorCustomizer to configure those but ideally we can just use properties to do it similar to many other properties.
Comment From: philwebb
@kzwang Do you have any specific properties that you need to configure often where a property would be helpful? We need to balance the number of properties that we expose vs how often they are practically needed.
Comment From: kzwang
The specific case I'm looking at is to configure overheadCountFactor, overheadDataThreshold, overheadWindowUpdateThreshold, and readTimeout as described in https://stackoverflow.com/a/65909369 to workaround http2 CloseNowException issue. We don't need to change those properties often, but we are building an internal framework on top of Spring Boot, so we want to have some default values in our internal framework and also allow apps using our framework to override those values easily (it's possible to do via TomcatConnectorCustomizer, just properties would be easier).
Comment From: philwebb
A little analysis on what we currently support:
| Tomcat | Spring Boot |
|---|---|
compressibleMimeType |
server.compression.mime-types |
compression |
server.compression.enabled |
compressionMinSize |
server.compression.min-response-size |
initialWindowSize |
- |
keepAliveTimeout |
server.tomcat.keep-alive-timeout |
maxConcurrentStreamExecution |
- |
maxConcurrentStreams |
- |
maxHeaderCount |
- |
maxHeaderSize |
server.max-http-header-size |
maxTrailerCount |
- |
maxTrailerSize |
- |
noCompressionStrongETag |
deprecated in Tomcat |
noCompressionUserAgents |
server.compression.excluded-user-agents |
overheadContinuationThreshold |
- |
overheadCountFactor |
- |
overheadDataThreshold |
- |
overheadWindowUpdateThreshold |
- |
readTimeout |
- |
streamReadTimeout |
- |
streamWriteTimeout |
- |
useSendfile |
- |
writeTimeout |
- |
Comment From: wilkinsona
Some of those aren't specific to HTTP/2:
maxHeaderCount(HTTP 1.1maxHeaderCount)readTimeout(HTTP 1.1connectionUploadTimeoutorconnectionTimeout)writeTimeout(HTTP 1.1connectionTimeout)
We may also want to consider which properties are available across all four web servers. For example, in addition to Tomcat, Jetty, Netty, and Undertow all also allow maxConcurrentStreams to be configured.
Comment From: philwebb
We discussed this as a team today and decided that we don't currently want to add any additional server properties. We feel that the TomcatConnectorCustomizer is the best option for users that want to configure more advanced aspects.