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

Streams support over http1? #639

Closed
Gictorbit opened this issue Nov 16, 2023 · 1 comment
Closed

Streams support over http1? #639

Gictorbit opened this issue Nov 16, 2023 · 1 comment
Assignees

Comments

@Gictorbit
Copy link

Gictorbit commented Nov 16, 2023

Does it support gRPC streams over http1 using websocket?
I used this package to convert grpc streams to websocket https://github.com/tmc/grpc-websocket-proxy

@jhump
Copy link
Member

jhump commented Nov 16, 2023

@Gictorbit, no it does not. Bidirectional streams only work over HTTP/2. Connect implementations generally implement the specs for gRPC, gRPC-Web, and Connect, none of which make mention of web sockets.

So when using HTTP 1.1, you are limited to server and client streams. If a server sees a request over HTTP 1.1 for a bidirectional streaming method, it will send a "505 HTTP Version Not Supported" error.

We may relax this in the future to allow bidirectional streams over HTTP 1.1, thanks to the newly added support in net/http (link). But even then, only half-duplex style streams can be guaranteed to work, as many peers may be unable to do full-duplex streaming with HTTP 1.1.

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

No branches or pull requests

2 participants