The HTTP2 Upgrade Protocol
Table of Contents
Introduction
The HTTP Upgrade Protocol element represents an Upgrade Protocol component that supports the HTTP/2 protocol. An instance of this component must be associated with an existing HTTP/1.1 Connector.
HTTP/2 connectors use non-blocking I/O, only utilising a container thread from the thread pool when there is data to read and write. However, because the Servlet API is fundamentally blocking, each HTTP/2 stream requires a dedicated container thread for the duration of that stream.
Requests processed using HTTP/2 will have the following additional request attributes available:
org.apache.coyote.connectionID
will return the HTTP/2 connection IDorg.apache.coyote.streamID
will return the HTTP/2 stream ID
Attributes
Common Attributes
All implementations of Upgrade Protocol support the following attributes:
Attribute | Description |
---|---|
className |
This must be |
Standard Implementation
The HTTP/2 Upgrade Protocol implementation supports the following attributes in addition to the common attributes listed above.
Attribute | Description |
---|---|
initialWindowSize |
Controls the initial size of the flow control window for streams that
Tomcat advertises to clients. If not specified, the default value of
|
keepAliveTimeout |
The time, in milliseconds, that Tomcat will wait between HTTP/2 frames
when there is no active Stream before closing the connection. Negative
values will be treated as an infinite timeout. If not specified, a default
value of |
maxConcurrentStreamExecution |
The controls the maximum number of streams for any one connection that
can be allocated threads from the container thread pool. If more streams
are active than threads are available, those streams will have to wait
for a stream to become available. If not specified, the default value of
|
maxConcurrentStreams |
The controls the maximum number of active streams permitted for any one
connection. If a client attempts to open more active streams than this
limit, the stream will be reset with a |
maxHeaderCount |
The maximum number of headers in a request that is allowed by the container. A request that contains more headers than the specified limit will be rejected. A value of less than 0 means no limit. If not specified, a default of 100 is used. |
maxTrailerCount |
The maximum number of trailer headers in a request that is allowed by the container. A request that contains more trailer headers than the specified limit will be rejected. A value of less than 0 means no limit. If not specified, a default of 100 is used. |
overheadContinuationThreshold |
The threshold below which the payload size of a non-final
|
overheadCountFactor |
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 |
overheadDataThreshold |
The threshold below which the average payload size of the current and
previous non-final |
overheadWindowUpdateThreshold |
The threshold below which the average size of current and previous
|
readTimeout |
The time, in milliseconds, that Tomcat will wait for additional data
when a partial HTTP/2 frame has been received. Negative values will be
treated as an infinite timeout. If not specified, a default value of
|
streamReadTimeout |
The time, in milliseconds, that Tomcat will wait for additional data
frames to arrive for the stream when an application is performing a
blocking I/O read and additional data is required. Negative values will be
treated as an infinite timeout. If not specified, a default value of
|
streamWriteTimeout |
The time, in milliseconds, that Tomcat will wait for additional window
update frames to arrive for the stream and/or connection when an
application is performing a blocking I/O write and the stream and/or
connection flow control window is too small for the write to complete.
Negative values will be treated as an infinite timeout. If not specified,
a default value of |
useSendfile |
Use this boolean attribute to enable or disable sendfile capability.
The default value is |
writeTimeout |
The time, in milliseconds, that Tomcat will wait to write additional
data when an HTTP/2 frame has been partially written. Negative values will
be treated as an infinite timeout. If not specified, a default value of
|
The HTTP/2 upgrade protocol will also inherit the following limits from the HTTP Connector it is nested with:
- allowedTrailerHeaders
- compressibleMimeType
- compression
- compressionMinSize
- maxCookieCount
- maxHeaderSize
- maxParameterCount
- maxPostSize
- maxSavePostSize
- maxTrailerSize
- noCompressionUserAgents
Nested Components
This component does not support any nested components.
Special Features
This component does not support any special features.