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

[💡FEATURE REQUEST]: Early Hints support (103 HTTP code) #918

Closed
azjezz opened this issue Jul 13, 2021 · 6 comments
Closed

[💡FEATURE REQUEST]: Early Hints support (103 HTTP code) #918

azjezz opened this issue Jul 13, 2021 · 6 comments
Assignees
Labels
C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc.. P-HTTP Plugin: HTTP
Milestone

Comments

@azjezz
Copy link

azjezz commented Jul 13, 2021

Currently, roadrunner allows sending 1 response at the time, this means we can't send early hint ( or any other 1xx ) responses.

Describe the solution you'd like

A solution to be able to send multiple responses at the time to the roadrunner server, this could be done by changing the structure of the payload to be sent ( and ofc ensuring the HTTP server itself is able to handle 1xx responses )

Describe alternatives you've considered

N/A

Additional context

ref:

@rustatian
Copy link
Member

Hey @azjezz , thanks for the FR. Likely it will be supported for the http3 (quick protocol) RR plugin rather than the actual HTTP plugin. At the moment we can't write to the ResponseWriter multiply times. According to the chromium discussion and Mozilla, Early Hints are not supported by the ecosystem.

@rustatian rustatian changed the title [FEATURE REQUEST] early hint response [FEATURE REQUEST] Early Hints support (103 HTTP code) Jul 13, 2021
@azjezz
Copy link
Author

azjezz commented Jul 13, 2021

while early hint is currently no supported by the ecosystem ( servers mostly ), it is supported by browsers, and unlike HTTP2/push, there's no plans to remove it.

from the OP: https://groups.google.com/a/chromium.org/g/blink-dev/c/K3rYLvmQUBY/m/vOWBKZGoAQAJ

The 103 Early Hints status code (https://tools.ietf.org/html/rfc8297) is expected to provide better performance under certain circumstances by allowing information about resources that the client should request to be sent as soon as available and then making the connection available for carrying data on other streams until the final response is sent. There is active effort to measure the potential latency gain of 103 Early Hints (compared to not using it, without using server push in either case), with the understanding that resources will be allocated to implementing it in Chromium in case data look promising. See https://chromium.googlesource.com/chromium/src/+/master/docs/early-hints.md for more details.

Therefor, i think HTTP2/push feature of RR should be deprecated once 1xx support is accomplished.

@rustatian
Copy link
Member

it is supported by browsers

I guess only Google Chrome supports the Early Hints (Safari??), because according to Mozilla bugtracker, at least Firefox does not support it. But, anyway, thanks for the FR, we will track support for the Go's stdlib and when multiply writes will be supported, there are no problems to add 103 HTTP code support.

@rustatian rustatian transferred this issue from roadrunner-server/roadrunner Sep 18, 2021
@rustatian rustatian changed the title Dec 25, 2021
@rustatian rustatian transferred this issue from roadrunner-server/roadrunner-plugins Jan 16, 2022
@rustatian rustatian added C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc.. P-HTTP Plugin: HTTP labels Jan 16, 2022
@alexander-schranz
Copy link

alexander-schranz commented Aug 2, 2022

Today is the day. GoLang 1.19 is released with supports for 103 Early Hints 🎉

https://twitter.com/golang/status/1554515292390408192

@rustatian
Copy link
Member

Hey guys 👋🏻 We discussed this feature with @roxblnfk. Since I'm working on the streaming support, we would like to support 103 Early Hints as well. Planned for the 2023.3.0 release 😃

@rustatian rustatian self-assigned this Jul 19, 2023
@rustatian rustatian added this to the v2023.3.0 milestone Jul 19, 2023
@rustatian
Copy link
Member

Done in 2023.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc.. P-HTTP Plugin: HTTP
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants