After many hours of studying and testing, a friend at Google shows me one solution to this problem! Thanks Thiago Avancini!
Well, the solution is:
The first step is to use managed vms. (The repo uses it.) But the goal is to switch control from Google to the user. When you do this, the next step is to create a static IP address for your application. In my case, I use port 3000 to service my Websocket, feel free to change. On my app.yaml, I also enabled this port as follows:
network: forwarded_ports: ["3000"]
Do not forget to include this port in the proxy in "network → default → firewall".
If you are deploying the application through gcloud, you need to re-enable user management and a static IP address in your application.
I will send this repo to GoogleCloudPlatform, this will be a sample for using websockets in AppEngine.
Kefka source share