为什么App Engine灵活环境不允许WebSocket和HTTP/2通信? [英] Why does App Engine Flexible Enviroment not allow WebSockets and HTTP/2 traffic?

查看:92
本文介绍了为什么App Engine灵活环境不允许WebSocket和HTTP/2通信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对WebSocket更加感兴趣,但是在阅读了文档

I'm more interested in WebSocket, but after reading documentation here, I was surprised when I read that:

App Engine灵活环境不支持以下功能: 到后端服务Websockets的HTTP/2流量,直接访问实例的HTTP请求

The following features are not supported by App Engine flexible environment: HTTP/2 traffic to the backend service, Websockets , HTTP requests that directly access instances

我当时计划用gorilla-websocket构建一个应用程序,但是现在我已经读了这篇文章,我不知道该如何完成它. 我了解App Engine标准环境不支持WebSocket,但为什么在灵活环境中不支持WebSocket?

I was planning to build an app with gorilla-websocket, but now that I've read this, I don't know how I could accomplish it. I understand WebSocket is not get supported in App Engine Standard Environment, but why not in the Flexible Environment?

推荐答案

还有其他选择:

像标准环境一样,灵活环境不 支持websockets.如果您需要使用网络套接字,则可以使用计算 引擎 Kubernetes引擎.

Like the standard environment, the flexible environment does not support websockets. If you need to use websockets you can use Compute Engine or Kubernetes Engine.

此处所述.

您也可以按照功能请求.

更新:

当前Websocket支持适用于以下语言

Currently websocket support is available for following languages

  • Python
  • Java
  • Node.js

但是它处于 beta

文档: https://cloud .google.com/appengine/docs/flexible/python/using-websockets-and-session-affinity

这篇关于为什么App Engine灵活环境不允许WebSocket和HTTP/2通信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆