Node.js云端的TCP套接字服务器[Heroku / AppFog] [英] Node.js TCP Socket Server on the Cloud [Heroku/AppFog]

查看:223
本文介绍了Node.js云端的TCP套接字服务器[Heroku / AppFog]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以在 Cloud ,更具体地在 Heroku AppFog 上运行Node.js TCP Socket导向的应用程序。

Is is possible to run a Node.js TCP Socket oriented application on the Cloud, more specifically on Heroku or AppFog.

它不是一个Web应用程序,而是一个用于访问客户端程序的服务器。基本思想是使用 Cloud - 扩展和一个易于使用的平台的功能。

It's not going to be a web application, but a server for access with a client program. The basic idea is to use the capabilities of the Cloud - scaling and an easy to use platform.

我知道这样的应用程序可以轻松地运行在IaaS上像Amazon AWS ,但我真的想利用 Heroku 的PaaS功能。

I know that such application could easily run on IaaS like Amazon AWS, but I would really like to take advantage of the PaaS features of Heroku or AppFog.

推荐答案

我相当肯定,没有回答手头的问题:是可能运行一个Node.js TCP Socket导向的应用程序。所有PaaS公司(包括Nodejitsu)都支持HTTP [S] - 仅用于传入连接的反向代理。

I am reasonably sure that doesn't answer the question at hand: "Is is possible to run a Node.js TCP Socket oriented application". All PaaS companies (including Nodejitsu) support HTTP[S]-only reverse proxies for incoming connections.

通常,使用node.js +任何PaaS以使用WebSockets,但

Generally with node.js + any PaaS with a socket oriented connection you want to use WebSockets, but:


  1. Heroku不支持WebSockets,只保留打开连接55秒 https://devcenter.heroku.com/articles/http-routing#timeouts

AppFog不支持WebSockets,但我不确定如何处理长时间的HTTP连接。

AppFog does not support WebSockets, but I'm not sure how they handle long-held HTTP connections.

Nodejitsu支持WebSockets,并将保持您的连接打开,直到关闭或重置。我们的node.js驱动反向代理使我们非常便宜。

Nodejitsu supports WebSockets and will hold your connections open until closed or reset. Our node.js powered reverse-proxies make this very cheap for us.

我们计划支持前面TCP负载平衡与未来的自定义端口。敬请期待!

We have plans to support front-facing TCP load-balancing with custom ports in the future. Stay tuned!

这篇关于Node.js云端的TCP套接字服务器[Heroku / AppFog]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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