Websocket getting upgrade but no frames from the client

I just noticed that gcp http(s) load balancer now supports websockets. I went to try it out and am having some problems. I have a gloabl https load balancer setup with Cloud CDN and a simple, no url-map, backend (Node.js). When I go to make websocket connection, I get a successful upgrade response but when I go to send frames to the server, they are never received. The server can send frames back to the client just fine. It is almost like the load balancer doesn't know that the connection has been upgraded and therefore doesn't allow any data sent from the client.

When I look in the logs for the https load balancer, I see the 101 Switching Protocols response and then statusDetails is "client_disconnected_after_partial_response" almost like it was a normal http request.

Any help would be appreciated.


After some investigation it seems that when a GCP load balancer is going through the GCP CDN, client messages never make it to the backend.

I worked around this by duplicating the backend configuration I wanted in a new backend called "websocket-prototype," and then just changing the "use cdn" setting for the websocket prototype. Finally, I mapped the path to my websocket server to the configuration without the CDN.

在这里输入图像描述

链接地址: http://www.djcxy.com/p/96338.html

上一篇: 如何从函数中禁用jQuery对话框中的按钮?

下一篇: Websocket获得升级,但没有客户端的框架