-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(server): default http1 header_read_timeout to 30 seconds #3395
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1ccd33d
to
8f24a40
Compare
cratelyn
added a commit
to linkerd/linkerd2-proxy
that referenced
this pull request
Jun 26, 2025
this fixes #14131. this relates to #14147, though it does not introduce a configurable option for this timeout. ### ✨ background in hyper 0.14, http/1.1 connections had no default header read timeout. per the documentation for [`hyper::server::Builder::http1_header_read_timeout()`][read-timeout-previous]: > Set a timeout for reading client request headers. If a client does not transmit the entire header within this time, the connection is closed. > > Default is None. compare this with the latest hyper release, which enforces a 30 second timeout for http/1.1 connections. per the documentation for [`hyper::server::conn::http1::Builder::header_read_timeout`][read-timeout-current]: > Set a timeout for reading client request headers. If a client does not > transmit the entire header within this time, the connection is closed. > > Requires a > [Timer](https://docs.rs/hyper/latest/hyper/rt/trait.Timer.html) set by > [Builder::timer](https://docs.rs/hyper/latest/hyper/server/conn/http1/struct.Builder.html#method.timer) > to take effect. Panics if header_read_timeout is configured without a > [Timer](https://docs.rs/hyper/latest/hyper/rt/trait.Timer.html). > > Pass None to disable. > > Default is 30 seconds. this was changed in hyperium/hyper#3395, which was included in [the v1.0 release][v1-changelog]. [read-timeout-previous]: https://docs.rs/hyper/0.14.31/hyper/server/struct.Builder.html#method.http1_header_read_timeout [read-timeout-current]: https://docs.rs/hyper/latest/hyper/server/conn/http1/struct.Builder.html#method.header_read_timeout [v1-changelog]: https://github.com/hyperium/hyper/blob/master/CHANGELOG.md#v100-2023-11-15 ### 🔨 changes this commit passes `None` to the `linkerd-proxy-http::server::ServeHttp` type's http/1 server-side connection builder, to remove the header read timeout. this restores the behavior that existed prior to linkerd/linkerd2#8733, which upgraded our hyper dependency from 0.14 to 1.0. X-Ref: linkerd/linkerd2#14147 X-Ref: linkerd/linkerd2#14131 X-Ref: linkerd/linkerd2#8733 X-Ref: hyperium/hyper#3395 Signed-off-by: katelyn martin <[email protected]>
cratelyn
added a commit
to linkerd/linkerd2-proxy
that referenced
this pull request
Jun 26, 2025
this fixes #14131. this relates to #14147, though it does not introduce a configurable option for this timeout. ### ✨ background in hyper 0.14, http/1.1 connections had no default header read timeout. per the documentation for [`hyper::server::Builder::http1_header_read_timeout()`][read-timeout-previous]: > Set a timeout for reading client request headers. If a client does not transmit the entire header within this time, the connection is closed. > > Default is None. compare this with the latest hyper release, which enforces a 30 second timeout for http/1.1 connections. per the documentation for [`hyper::server::conn::http1::Builder::header_read_timeout`][read-timeout-current]: > Set a timeout for reading client request headers. If a client does not > transmit the entire header within this time, the connection is closed. > > Requires a > [Timer](https://docs.rs/hyper/latest/hyper/rt/trait.Timer.html) set by > [Builder::timer](https://docs.rs/hyper/latest/hyper/server/conn/http1/struct.Builder.html#method.timer) > to take effect. Panics if header_read_timeout is configured without a > [Timer](https://docs.rs/hyper/latest/hyper/rt/trait.Timer.html). > > Pass None to disable. > > Default is 30 seconds. this was changed in hyperium/hyper#3395, which was included in [the v1.0 release][v1-changelog]. [read-timeout-previous]: https://docs.rs/hyper/0.14.31/hyper/server/struct.Builder.html#method.http1_header_read_timeout [read-timeout-current]: https://docs.rs/hyper/latest/hyper/server/conn/http1/struct.Builder.html#method.header_read_timeout [v1-changelog]: https://github.com/hyperium/hyper/blob/master/CHANGELOG.md#v100-2023-11-15 ### 🔨 changes this commit passes `None` to the `linkerd-proxy-http::server::ServeHttp` type's http/1 server-side connection builder, to remove the header read timeout. this restores the behavior that existed prior to linkerd/linkerd2#8733, which upgraded our hyper dependency from 0.14 to 1.0. X-Ref: linkerd/linkerd2#14147 X-Ref: linkerd/linkerd2#14131 X-Ref: linkerd/linkerd2#8733 X-Ref: hyperium/hyper#3395 Signed-off-by: katelyn martin <[email protected]>
cratelyn
added a commit
to linkerd/linkerd2-proxy
that referenced
this pull request
Jun 26, 2025
this fixes #14131. this relates to #14147, though it does not introduce a configurable option for this timeout. ### ✨ background in hyper 0.14, http/1.1 connections had no default header read timeout. per the documentation for [`hyper::server::Builder::http1_header_read_timeout()`][read-timeout-previous]: > Set a timeout for reading client request headers. If a client does not transmit the entire header within this time, the connection is closed. > > Default is None. compare this with the latest hyper release, which enforces a 30 second timeout for http/1.1 connections. per the documentation for [`hyper::server::conn::http1::Builder::header_read_timeout`][read-timeout-current]: > Set a timeout for reading client request headers. If a client does not > transmit the entire header within this time, the connection is closed. > > Requires a > [Timer](https://docs.rs/hyper/latest/hyper/rt/trait.Timer.html) set by > [Builder::timer](https://docs.rs/hyper/latest/hyper/server/conn/http1/struct.Builder.html#method.timer) > to take effect. Panics if header_read_timeout is configured without a > [Timer](https://docs.rs/hyper/latest/hyper/rt/trait.Timer.html). > > Pass None to disable. > > Default is 30 seconds. this was changed in hyperium/hyper#3395, which was included in [the v1.0 release][v1-changelog]. [read-timeout-previous]: https://docs.rs/hyper/0.14.31/hyper/server/struct.Builder.html#method.http1_header_read_timeout [read-timeout-current]: https://docs.rs/hyper/latest/hyper/server/conn/http1/struct.Builder.html#method.header_read_timeout [v1-changelog]: https://github.com/hyperium/hyper/blob/master/CHANGELOG.md#v100-2023-11-15 ### 🔨 changes this commit passes `None` to the `linkerd-proxy-http::server::ServeHttp` type's http/1 server-side connection builder, to remove the header read timeout. this restores the behavior that existed prior to linkerd/linkerd2#8733, which upgraded our hyper dependency from 0.14 to 1.0. X-Ref: linkerd/linkerd2#14147 X-Ref: linkerd/linkerd2#14131 X-Ref: linkerd/linkerd2#8733 X-Ref: hyperium/hyper#3395 Signed-off-by: katelyn martin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Default the header read timeout to 30 seconds.
This depends on #3394 merging.
cc @82marbag