Since there is no answer, this is what I was able to learn about using Zuul with WebSockets.
My question was inaccurate in the sense that I used Sock.js, and when connecting through Zuul Sock.js it turned out:
405 - Bad request
which immediately dropped it on xhr-straming, and this is when it was able to establish a connection, therefore
Cannot use Websocket protocol overriding Zuul.
But still, I encountered a second problem, even when I managed to connect using the Sock.js backup transport, the connection was constantly closed by the proxy. Fortunetly Sock.js requires that the server “send” audible calls every 10 seconds (by default), so by setting the tape and hysteresis timeouts, you can maintain a “Sock.js connection” without special re-enable logic. As described in the link:
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 60000 tape: ConnectTimeout: 3000 ReadTimeout: 60000
I set these timeouts to double the usage time of Sock.js - so 20 seconds.
However, this is not native Websocket support.
I'm still looking for a reasonable replacement for the Zuul proxy or some recommendations on what other steps I could take to complete this work.
source share