0

Currently I am developing a mobile application with ionic 2. Within the application I got chat functionality. The chat functionality is based on Socket io in a NodeJS API. Unfortunality, it is hard to configure the socket io on Google Cloud App Engine. On my local machine it works fine.

Steps I have undertook:

  • use port 65080 (and open the firewall port)
  • 2 servers (api calls via 8080 and socket io via 65080

Sample

Does anybody have a solution? Thank you in advance!

Jelle

2 Answers2

1

Sadly, neither socket.io or Websockets currently work on App Engine. This is something we're actively trying to address:

https://cloud.google.com/appengine/docs/flexible/nodejs/how-requests-are-handled#not_supported

Justin Beckwith
  • 7,686
  • 1
  • 33
  • 55
  • Is there any workaround to get sockets working at Google Cloud? It is possible to connect directly on the IP address, but this situation is not optimal. – Jelle van Lith Apr 04 '17 at 18:22
1

This question is almost identical to this one, and there's some new good news:

GAE support for persistent socket connections arrived in February 2019!

To make this work, you'll need to be using the flex environment and modify your app.yaml to include session_affinity.

Community
  • 1
  • 1
Charlie
  • 15,069
  • 3
  • 64
  • 70