Google Cloud Functions with socket.io

后端 未结 1 570
一向
一向 2021-01-06 11:22

My understanding is that to establish a persistent socket connection using socket.io the Node.js server should be always running. With Google Cloud Functions there isn\'t an

相关标签:
1条回答
  • 2021-01-06 11:44

    Neither Cloud Functions nor Cloud Run are able to support persistent socket connections for the same reasons. Each request has a timeout that can't be infinite. If you want to use socket.io effectively, you will need a different backend - one where you fully control the server instances.

    0 讨论(0)
提交回复
热议问题