Heroku 是否可以同时处理多个连接(Sinatra on Thin)?
我正在阅读 Heroku 路由文章,并对以下内容感到困惑:
一次一个连接
heroku.com 堆栈仅支持单线程请求。即使您的应用程序要分叉并支持同时处理多个请求,路由网格也永远不会一次向 dyno 提供多个请求。
以及本文后面的内容。 ..
多个同时连接
herokuapp.com 路由堆栈可用于希望同时处理多个连接的异步或多线程应用程序。 Ruby Web 服务器比如歌利亚、薄(使用合适的 Web 框架,例如 Async Sinatra)或您自己的自定义 EventMachine Web 流程都是一些示例。 Node.js Web 应用程序(例如使用 Express 构建的应用程序)几乎总是可以在单个进程中处理多个连接,大多数 Python、Java、Scala 和 Clojure 应用程序也可以。
那么它是哪一个呢?或者这两个人谈论的是不同的事情? (即请求和连接不同)
谢谢
I'm reading the Heroku Routing article and confused by the following:
One Connection at a Time
The heroku.com stack only supports single threaded requests. Even if your application were to fork and support handling multiple requests at once, the routing mesh will never serve more than a single request to a dyno at a time.
and later in the article ...
Multiple Simultaneous Connections
The herokuapp.com routing stack can be used for async or multi-threaded apps that wish to handle more than one connection simultaneously. Ruby webservers such as Goliath, Thin (with a suitable web framework such as Async Sinatra), or your own custom EventMachine web process are some examples. Node.js web apps (such as those built with Express) can almost always handle multiple connections in a single process, as can most Python, Java, Scala, and Clojure apps.
Which one is it then? Or are the two bits talking about different things? (i.e, requests and connections are different)
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我假设您正在阅读以下内容:
http://devcenter.heroku.com/articles/http-routing
无论您运行什么进程,Heroku 路由网格一次只会向您的应用程序发出一个请求,在 Apsen 和 Bamboo 堆栈上。
但在 Cedar 堆栈上,您可以同时进行多个连接。
可通过 *.herokuapp.com 识别
I assume you're reading this:
http://devcenter.heroku.com/articles/http-routing
Regardless of the processes you have running, the Heroku routing mesh will only issue one request to your application at a time, on the Apsen and Bamboo stacks.
On the Cedar stack though, you are allowed multiple simultaneous connections.
identifiable by *.herokuapp.com
两者确实在谈论不同的事情,但不是你所想到的不同的事情。
两人谈论的是 Heroku 的两个不同平台,
*.heroku.com
的 Aspen/Bamboo 平台和*.herokuapp.com
的 Cedar 平台。The two are indeed talking about different things, but not the different things you were thinking of.
The two are talking about Heroku's two different platforms, the Aspen/Bamboo platform at
*.heroku.com
and the Cedar platform at*.herokuapp.com
.