Does Consul Connect support WebSockets?


I am evaluating Nomad/Consul Connect/Vault to deploy an existing set of microservices built using Spring Cloud. These use GraphQL subscriptions heavily, and therefore use websockets.

I am experiencing the following errors and it seems to me that the websocket connections are not being established.

Does Consul Connect support using websockets through the mesh?

I have found some documentation that suggests I first need to switch to the http protocol ( ) and then I would be blocked by this issue ( ).

However I am clutching at straws a little, as right now it seems as though I would be using the default protocol of tcp, on which websocket connections appear to be failing.

So in the first instance I am looking for some help in knowing just what Consul Connect supports and how it should be configured.

Does anyone have any experience of using websockets over Consul Connect, is that supported?

04-12-2020 15:37:07.217 [reactor-http-epoll-1] WARN  r.n.http.client.HttpClientConnect - [id: 0x62c5edde, L:/ - R:] The connection observed an error
io.netty.handler.codec.http.websocketx.WebSocketHandshakeException: Invalid handshake response getStatus: 401 
	at io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker13.verify(
	at io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker.finishHandshake(
	at reactor.netty.http.client.WebsocketClientOperations.onInboundNext(

Hi @awarner-greshamtech,

Consul currently does not support WebSockets upgrades thru any Envoy proxy when the associated service is registered in Connect with a protocol of HTTP. The issue you linked which I filed is current, and still needs to be resolved for that work.

WebSockets do however function when the service’s protcol is configured as TCP.

Thanks @blake,

It turns out my issue presented itself as a websockets issue but was not. Our websocket subscriptions work OK over the TCP proxies now.

We would however be prevented from using some of the advanced L7 Consul Connect features that require HTTP proxies (e.g. Canary deployments) so we would appreciate being fixed.