heroku中的四个1X dynos和两个2X dynos有什么区别? [英] What is the difference between four 1X dynos and two 2X dynos in heroku?

查看:95
本文介绍了heroku中的四个1X dynos和两个2X dynos有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道答案吗?我在heroku上生成了两个2X dyno,而免费的1X dyno的性能要比两个2X dyno更好.他们两个都有同一个Rails应用程序,并且正在同一个数据库进行通话.真让我难以置信!

Does anyone know the answer for this? I spawned two 2X dynos on heroku and the performance with the free 1X dyno is much better than the two 2X dynos. They both have the same Rails app talking to the same database. Boggles my mind!

推荐答案

更多的dynos给您更多的并发性.基于单线程Web服务器(例如Thin),如果您有4 x 1x dynos,则可以同时处理四个请求.

More dynos give you more concurrency. Based on a single threaded web server such as thin, if you have 4 x 1x dynos, you can serve four requests at the same time.

使用2 x 2x测功机,您只能服务两个请求.

With 2 x 2x dynos you can only serve two requests.

2x dynos具有更多的内存(1024MB)和更多的CPU可用.如果您的应用程序占用大量内存,这将很有用.大多数应用都不需要2x dynos.

2x dynos have more memory (1024MB) and more CPU available. This is useful if your application takes up a lot of memory. Most apps should not need 2x dynos.

Heroku最近还添加了PX dynos,它们具有明显更多的可用功率.

Heroku have recently added PX dynos as well, which have significantly more power available.

您可以在 Heroku在其网站上提供的内容中了解不同的dynos .

这篇关于heroku中的四个1X dynos和两个2X dynos有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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