roadrunner
roadrunner copied to clipboard
[💡FEATURE REQUEST]: Early Hints support (103 HTTP code)
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:
- https://github.com/golang/go/pull/42597
- https://github.com/php/php-src/pull/7025
- https://github.com/lucas-clemente/quic-go/pull/3047
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.
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.
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.
Today is the day. GoLang 1.19 is released with supports for 103 Early Hints 🎉
https://twitter.com/golang/status/1554515292390408192
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 😃
Done in 2023.3