osiris icon indicating copy to clipboard operation
osiris copied to clipboard

WebSocket Support

Open SamCHogg opened this issue 6 years ago • 3 comments

Environment:

  • Kubernetes distribution: EKS
  • Kubernetes version: v1.11.8-eks-7c34c0
  • Osiris version: 0.0.1-2019.05.21.13.53.23-4f8deee
  • Install method: helm install osiris/osiris-edge --name osiris --namespace osiris-system --devel

What happened? I have been starting to use this project to scale down our preview environments (which is really awesome btw!). However I came across issues when I tried to use this one of our services which relies on websockets. The browser gets a '502 Bad Gateway' response from the websocket requests. Checking the logs from the proxy sidecar I see this error:

http: proxy error: internal error: 101 switching protocols response with non-writable body

So I was wondering if websockets are supported, and what I might be missing to get this working?

What you expected to happen? Websocket requests work correctly through the proxy.

SamCHogg avatar Jul 30 '19 15:07 SamCHogg

Looking at the implementation here: https://github.com/deislabs/osiris/blob/4f8deeed3373fd948d89977f5e77e4776f424cfa/pkg/net/http/httputil/reverseproxy.go#L506-L548

And based on this comment: https://github.com/golang/go/issues/26937#issuecomment-435623896

I see that the implementation used relies on Go 1.12 features, where as I believe this project is complied with Go 1.11. The comment below shows an implementation which works with 1.11.

SamCHogg avatar Jul 30 '19 16:07 SamCHogg

There is no support for web sockets at the moment, nor do I believe it's planned. (This project is relatively dormant at the moment.)

I see that the implementation used relies on Go 1.12 features, where as I believe this project is complied with Go 1.11.

Relevant Go 1.12 features were replicated in our own source tree. Now that Go 1.12 is available, we can probably undo that.

krancour avatar Jul 30 '19 16:07 krancour

Relevant Go 1.12 features were replicated in our own source tree. Now that Go 1.12 is available, we can probably undo that.

Ah, I see that now. Makes sense.

There is no support for web sockets at the moment, nor do I believe it's planned. (This project is relatively dormant at the moment.)

That is sad to hear, especially with how some projects rely on websockets, but it's at least good to know.

SamCHogg avatar Jul 30 '19 18:07 SamCHogg