Repository navigation
Introduce HTTP/2 max-concurrent-streams settings - #2146
Conversation
|
|
||
| bindAndHandle(Flow[HttpRequest].mapAsync(parallelism)(handler), interface, port, connectionContext, settings, log) | ||
| val definitiveParallelism = | ||
| if (parallelism != 0) parallelism |
johanandren
left a comment
There was a problem hiding this comment.
LGTM with one question about HTTP/2
| def withIncomingStreamLevelBufferSize(newIncomingStreamLevelBufferSize: Int): Http2ServerSettings | ||
|
|
||
| def getMaxConcurrentStreams: Int = maxConcurrentStreams | ||
| def withMaxConcurrentStreams(newValue: Int): Http2ServerSettings |
There was a problem hiding this comment.
One thought, I don't remember the exact HTTP/2 details, but, isn't there a way this should be sent to the client to inform it about how many sub streams it may use to the server?
There was a problem hiding this comment.
Hm indeed it can be set as SETTING frame:
5.1.2 Stream Concurrency
A peer can limit the number of concurrently active streams using the SETTINGS_MAX_CONCURRENT_STREAMS parameter (see Section 6.5.2) within a SETTINGS frame. The maximum concurrent streams setting is specific to each endpoint and applies only to the peer that receives the setting. That is, clients specify the maximum number of concurrent streams the server can initiate, and servers specify the maximum number of concurrent streams the client can initiate.
I guess this is more like a default value for us for now hm... The setting we don't respect yet I guess
There was a problem hiding this comment.
That's correct, in future we could announce and enforce this value with HTTP/2.
… with HTTP/2 Before it was set to 1 regardless of HTTP/1 or HTTP/2. In HTTP/2, a higher setting makes sense per default to actually benefit from multiplexing.
|
Test PASSed. |
|
Test PASSed. |

Refs #2145
The idea is to change the default for the
bindAndHandleAsyncparallelismparameter to0, which means "take the value from the configuration".We then take different values for HTTP/1 and HTTP/2:
pipelining-limitbecause that's even stronger than parallelismhttp2.max-concurrent-streams