Skip to content
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

feat!(H2): enable H2 by default #3814

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

feat!(H2): enable H2 by default #3814

wants to merge 3 commits into from

Conversation

metcoder95
Copy link
Member

@metcoder95 metcoder95 commented Nov 8, 2024

This relates to...

Enable HTTP/2 support by default.

Rationale

After a chat with @mcollina, we have noticed that the most important pieces for HTTP/2 to work within Undici has been already implemented.
The number of issues and bugs has been reduced since the implementation of the feature, and now the HTTP/2 client is fully onboarded into the Undici's queue system.

Given that the adoption seems good and stable, I propose to enable the H2 by default for the upcoming major release.

Changes

Features

Bug Fixes

Breaking Changes and Deprecations

Status

@KhafraDev KhafraDev added the semver-major Features or fixes that will be included in the next semver major release label Nov 8, 2024
@KhafraDev KhafraDev mentioned this pull request Nov 9, 2024
Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with it being enabled by default for fetch. Though I don't think it provides any meaningful advantage outside of fetch.

@metcoder95
Copy link
Member Author

My thoughts on this is that it benefits mostly the use-cases that requires usually network calls to the internet (basically in the wild), as its where most of the HTTP/2 interactions happen.

Fetch sadly does not really benefits from it as is not totally capable of handling H2 headers accordingly (and based on its semantics it seems mostly modeled around H1 in mind).

The benefit I see on enabling it is for the uses cases previously mentioned, but it would beup to the server to decide which protocol to use.

On top, this will only have visible effects on TLS connections, as we do not support h2c; for instance in a good majority of cases H1 will prevail.

Maybe worth to document more of its intricacies just to put users aware?

@mcollina
Copy link
Member

Fetch sadly does not really benefits from it as is not totally capable of handling H2 headers accordingly (and based on its semantics it seems mostly modeled around H1 in mind).

How? Are you saying that a fetch() call will fail if we enable this?

@metcoder95
Copy link
Member Author

Fetch sadly does not really benefits from it as is not totally capable of handling H2 headers accordingly (and based on its semantics it seems mostly modeled around H1 in mind).

How? Are you saying that a fetch() call will fail if we enable this?

Nop, fetch works with H2 regardless. What I am referring to with incompatibilities is that fetch does not handle several concepts of H2 (e.g. pseudo headers handling, does not fail but we do not parse these headers for the Headers map)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major Features or fixes that will be included in the next semver major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants