-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP/2 apply SETTINGS configuration on reply #9801
Comments
The implementation needs to coordinate with the writes, so would be best to queue into the flusher a fake frame that updates the configuration and sends the SETTINGS reply. In this way, there is a window where both sides work on default settings, but it is guaranteed that when a peer receives a SETTINGS reply, then subsequent frames have seen the new configuration. |
Error scenario 1:server configured with maxFrameSize=100 client sends empty SETTINGS (all values at default) server receives SETTINGS Error scenario 2:server configured with maxTableCapacity=0 client sends empty SETTINGS (all values at default) server receives SETTINGS Fixed Scenario 1server prepares configuration with maxFrameSize=100, but does not apply it yet Sub-Scenario 1a client receives SETTINGS(maxFrameSize=100) server receives SETTINGS(reply) Sub-Scenario 1b client sends empty SETTINGS (all values at default) server receives empty SETTINGS The solution applies the configuration only when receiving a SETTINGS(reply). However, there still is a race between the network reader thread writing the configuration and the network writer thread reading the configuration. To avoid this problem, the network reader thread could enqueue a synthetic frame that writes the configuration, so that only the network writer thread reads and writes the configuration, in the order the frames are enqueued. |
This issue has been automatically marked as stale because it has been a |
Jetty version(s)
10+
Description
Currently, the SETTINGS configuration is applied locally before receiving the SETTINGS reply from the other peer.
This may cause races between the local peer that already has the new configuration, and the remote peer which is not aware of the new configuration.
The text was updated successfully, but these errors were encountered: