Secure websockets on app engine (?)
The README for the appengine/websockets example says:
To use Secure WebSockets now, you can launch a VM on Google Compute Engine using a custom image where you have added SSL support for WebSockets.
It would be great if the README could elaborate on this, as most sites are served over HTTPS nowadays and thus also require the websockets connection to be secure. This is also my usecase!
In, fact any suggestion on how supporting SSL inside that docker image could be achieved, would be greatly appreciated!
@JustinBeckwith Any thoughts?
Bump. Same question here. Need secure websockets on App Engine for our node.js implementation. So far, this seems to be the last issue preventing us from moving our Production env. to App Engine. Any updates?
If/while this is being worked on, can some of the reasons for no WSS support on App Engine flexible be shared?
GCP's general approach to security has been great, and the advice to use a VM goes against why many use GAE to begin with (minimal ops!).
Same here, we opted out of using socket.io over the apparent widespread support for websockets so its a must. Unsecure apps even for development just seems unwise.
Same here, would appreciate an example on setting up secured websockets on a manage vm
Did anyone manage to solve this successfully? I have an implementation of a secure websocket server that appears to be running on Appengine but on connection to the websocket I receive the response
failed: Error in connection establishment: net::ERR_INSECURE_RESPONSE
Edit: On further investigation, the error arises from the use of self-signed certificates.
@edmothershaw, please can you tell how have you achieved it? Does appengine flex support secure websockets now? Or is there some workaround?
The solution we eventually went with was to deploy the websocket server in Kubernetes. I'm unsure if it supports it now but my guess is that it does not and probably never will (appengine/websockets is no longer included in the sample docs). They suggest using compute engine in this example https://cloud.google.com/solutions/real-time-gaming-with-node-js-websocket
Thank you so much for response, yes it seems so and here is commit: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/commit/18210b3bd741da95b42fbea884922ef4c7cd57fe
So compute engine is the way I go.
@art-grig Is there any example or documentation on how to run WebSockets service with Node.js on Compute Engine?
@Ajaxy there is nothing special about Compute Engine for configuring websockets with node js, I would suggest to make it over nginx, this could be helpfull: https://blag.felixhummel.de/junk/nginx_socketio_wss_test.html
@art-grig Thanks for the link. Well, I’m not sure, “Compute Engine” doesn’t sound like a proper place for a tiny WS service. I’m just using ML Engine for serving AI service, so I thought would be convinient to store all parts on GCloud. Now I’m thinking about using Heroku for WS service.
Hello everyone, are there any updates on this? 😄
Greetings! As far as I know, App Engine has not added Web Socket support just yet. @steren would have the latest :)
Websockets are coming to the App Engine flexible environment: https://issuetracker.google.com/35886348
@steren Thank you for your answer. I know this is probably hard to estimate, do you have an ETA for this? We have some major decisions to make in my team and one of the key decision-making factor is the WebSockets support 😄
I suggested the Product Manager owning this feature to give more details on https://issuetracker.google.com/35886348. Watch the issue for updates.
Greetings folks! As Steren called out, this is the place to look for updates here: https://issuetracker.google.com/issues/35886348
Since this isn't an issue specific to the docs or samples, I'm going to close this one out. Please do let us know if you have any questions!
So is it still not possible to have WebSockets in 2023 on any container service from google? Cloud Run, App Engine without using Long Polling or Socket.io
Cloud Run has support for websockets: https://cloud.google.com/run/docs/triggering/websockets