WebSocket closed unexpectedly

Ok, I have found the solution, it’s all explained in this post

GCP LoadBalancers are not by default configured to handle websockets and optimized for http calls, because by default the load balancers have 30 second timeouts in place that causes connections to close.

As explained there the solution is to create a BackendConfig, and let the proxy-public service know about it. For example in our values.yaml

  proxy:
    service:
      annotations:
        beta.cloud.google.com/backend-config: '{"ports": {"80":"proxy-public-backendconfig"}}'
2 Likes