-
Notifications
You must be signed in to change notification settings - Fork 39
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
Bi-directional streaming? #181
Comments
Not a heroku employee here, but that is correct. Vegur does not support bidirectional streaming of that kind with regular HTTP requests; instead it assumes that websockets will be used for that use case. |
Thanks for your clarification. There is nothing in the RFC for HTTP/1 or HTTP/2 that prevents bidirectional streaming so it would be great to support it. |
HTTP/2 is not supported in Vegur, so that bears no weight with regards to its design. On the other hand, from what I can recall, the type of error reporting that Heroku does for multiple types of errors do require or are at least facilitated by bidirectional streaming not taking place (i.e. interruption of transfer can result in heroku-inserted error pages), which was inherited from the behaviour of older proxying software. Other interesting aspects are related to pipelining and the ability to parse and validate content. Part of the response is buffered if it isn't an interruption for some error cases or HTTP 100s being sent, but in some cases it is let through. At the time of writing the software, the Erlang virtual machine was more performant on passive connections (which make it simpler to implement with blocking) and this impacted some of the decisions taken with regards to the implementation along with backwards compatibility. With performance improvements in the VM, a modern vegur design would probably be different. That being said, I'm no longer working for Heroku (and haven't for roughly 3 years), and I'm not privy to the internal roadmap and engineering effort that will go into this software going forwards. |
More details here: whatwg/fetch#966 (comment)
I've got a test case for bi-directional streaming using this client/server: https://github.com/socketry/utopia-falcon-heroku/
Request Streaming
Locally (working)
Using the code above:
To start the client:
Type some lines and they will be echoed back in real time.
Heroku (not working?)
Run this on the client:
You should be able to type lines and get an interactive response, but it seems like the response is buffered until the request body is completed.
The text was updated successfully, but these errors were encountered: