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

Configure HTTP/2 prior knowledge per destination #363

Closed
ericwj opened this issue Aug 8, 2020 · 3 comments
Closed

Configure HTTP/2 prior knowledge per destination #363

ericwj opened this issue Aug 8, 2020 · 3 comments
Labels
Type: Idea This issue is a high-level idea for discussion.

Comments

@ericwj
Copy link
Contributor

ericwj commented Aug 8, 2020

What should we add or change to make your life better?

Consider adding a configuration option per destination or per cluster to enable HTTP/2 prior knowledge.

Why is this important to you?

I think HTTP/2 is a fine improvement over HTTP/1.1 almost regardless of the application and it is beneficial to still do HTTPS termination at the proxy - besides the performance benefits, already if it were only to get rid of certificate management.

How did you get the idea?

I managed to get rid of the delays I reported in #355 by configuring the downstream Kestrels with

"Kestrel": { "EndpointDefaults": { "Protocols": "Http2" } },

but to get that working I needed this in the proxy:

AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);

However now my proxy doesn't proxy to another HTTP/1 backend anymore. I basically have to choose which half of the downstream servers are going to respond with an empty body.

How can this be done?

I don't know. Reverse proxy doesn't let me choose the HTTP version that is set on the request certainly, but I don't know whether that even matters - whether there is a way in .NET to let the proxy be selective about which servers to send HTTP/2 requests to. Although I can hardly believe that AppContext swhitch just globally makes every outbound request HTTP/2?

@ericwj ericwj added the Type: Idea This issue is a high-level idea for discussion. label Aug 8, 2020
@Tratcher
Copy link
Member

Tratcher commented Aug 8, 2020

This requires #137 and #282. Then you'd be able to control this on a per cluster basis. Do you think that would be granular enough?

@ericwj
Copy link
Contributor Author

ericwj commented Aug 8, 2020

For me yes.

@karelz
Copy link
Member

karelz commented Aug 11, 2020

Duplicate of #137

@karelz karelz marked this as a duplicate of #137 Aug 11, 2020
@karelz karelz closed this as completed Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Idea This issue is a high-level idea for discussion.
Projects
None yet
Development

No branches or pull requests

3 participants