Heroku 是否可以同时处理多个连接(Sinatra on Thin)?

发布于 2024-12-29 01:46:13 字数 549 浏览 2 评论 0原文

我正在阅读 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

硬不硬你别怂 2025-01-05 01:46:13

我假设您正在阅读以下内容:

http://devcenter.heroku.com/articles/http-routing

无论您运行什么进程,Heroku 路由网格一次只会向您的应用程序发出一个请求,在 Apsen 和 Bamboo 堆栈上

但在 Cedar 堆栈上,您可以同时进行多个连接。

  • 白杨/竹子很容易通过 *.heroku.com 识别
  • 雪松是
    可通过 *.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.

  • Aspen / Bamboo is easily identified by *.heroku.com
  • Cedar is
    identifiable by *.herokuapp.com
暮年 2025-01-05 01:46:13

那是哪一个呢?或者这两个人谈论的是不同的事情? (即请求和连接不同)

两者确实在谈论不同的事情,但不是你所想到的不同的事情。

两人谈论的是 Heroku 的两个不同平台,*.heroku.com 的 Aspen/Bamboo 平台和 *.herokuapp.com 的 Cedar 平台。

Which one is it then? Or are the two bits talking about different things? (i.e, requests and connections are different)

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文