Skip to content

Improve docs for http/connection-pool's HTTP/2 support and ALPN config #729

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
merged 6 commits into from
Jun 20, 2024

Conversation

DerGuteMoritz
Copy link
Collaborator

Prompted by #727

@KingMob
Copy link
Collaborator

KingMob commented Jun 13, 2024

Are you sure you want to mandate ALPN and update the docs, instead of updating the code?

@arnaudgeiser
Copy link
Collaborator

arnaudgeiser commented Jun 13, 2024

Are you sure you want to mandate ALPN and update the docs, instead of updating the code?

I think we should close the documentation PR and aim at updating the code with the snippet above.

@DerGuteMoritz DerGuteMoritz marked this pull request as draft June 13, 2024 13:36
@DerGuteMoritz
Copy link
Collaborator Author

Are you sure you want to mandate ALPN and update the docs, instead of updating the code?

No I would prefer to update the code, as well. Will prepare a patch for that separately and once it's landed, we can get back to the doc update here.

I think we should close the documentation PR and aim at updating the code with the snippet above.

The doc update is mostly orthogonal, only the wording about the ALPN config requirement would have to be changed once we've made it (more) optional again.

Comment on lines 941 to 950
Takes a vector of HTTP versions, in order of preference. E.g., `[:http2 :http1]`

Note that the returned config uses `SelectorFailureBehavior.NO_ADVERTISE`[1] and
`SelectedListenerFailureBehavior.ACCEPT`[2] since these are the only failure behaviors
supported by all SSL providers. See their documentation for details. One important
consequence of this is that it's not possible to completely opt out of HTTP/1.1 by way of
only specifying `[:http2]`.

1: https://netty.io/4.1/api/io/netty/handler/ssl/ApplicationProtocolConfig.SelectorFailureBehavior.html#NO_ADVERTISE
2: https://netty.io/4.1/api/io/netty/handler/ssl/ApplicationProtocolConfig.SelectedListenerFailureBehavior.html#ACCEPT"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add a line to the effect of: "If you want this behavior, you will need to supply an SslContext with a different config."

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done via 439214b -- I made it about ApplicationProtocolConfig instead since it can also be used with an ssl-context options map, custom SslContext isn't even required.

@DerGuteMoritz DerGuteMoritz marked this pull request as ready for review June 18, 2024 14:42
Copy link
Collaborator

@KingMob KingMob left a comment

Choose a reason for hiding this comment

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

Overall LGTM, but see my minor doc suggestion

@DerGuteMoritz DerGuteMoritz merged commit 72981f4 into master Jun 20, 2024
1 check passed
@DerGuteMoritz DerGuteMoritz deleted the 727/improve-docs branch June 20, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants