一台Heroku Web Dyno究竟是什么? [英] What exactly is a single Heroku Web Dyno?

查看:223
本文介绍了一台Heroku Web Dyno究竟是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据为什么当AWS存在时,人们使用Heroku吗? Heroku与AWS的区别在哪里?,似乎有几个Heroku Web Dynos运行在单个Amazon EC2 CPU上。



在一个CPU上运行多少个Dynos?什么是规格?

在一个CPU上运行的大量Dynos是否会影响其他Dynos?

部署Heroku应用程序时,使用一个或多个 buildpacks构建名为 slug 的虚拟机映像。当从 slug 启动虚拟机实例时,它被称为 dyno



每个 dyno 在您的应用程序虚拟机中运行一个进程。 Heroku没有正式描述如何配置dynos,但是有趣的分析显示许多dynos运行在单个Amazon XL EC2实例上,跨所有dynos共享磁盘,CPU和内存。共享资源时确实存在嘈杂的邻居,但不提供直接数据或统计信息。我只能分享我的轶事经验,确实发生了这种情况。

每台测功机在EC2托管机器中是孤立的,但共享底层资源。这与 docker 和其他应用程序容器的工作方式类似。



Dynos注册Heroku路由网格,智能负载平衡器,可将传入的网络流量映射到应用程序dyno。每个dyno都分配了一个TCP端口,并已通过路由网格注册。



Heroku是Amazon EC2之上的更高级服务。他们以原始EC2托管的高额成本实施部署,供应,监控,可用性和自动扩展。您可以运行自己的EC2实例,但需要自己实现这些服务。



免责声明:我不是Heroku的员工,没有特别的除了作为大型高流量Rails应用程序的用户之外,还可以了解Heroku的知识。



更新: Heroku推出 PX size dynos今天早上,它们被托管在一个专用的EC2 c1.xlarge 实例上,它解决了所有的噪声邻居问题和资源争夺问题I提到上面。在一个重要的价格标签。详情如下: https://blog.heroku.com/archives/2014/2/3/heroku -xl


According to Why do people use Heroku when AWS is present? What distinguishes Heroku from AWS?, it seems that several Heroku Web Dynos run on a single Amazon EC2 CPU.

How many Dynos run on one CPU? What are the specs?

Do a large number of Dynos running on one CPU affect the other Dynos?

解决方案

When you deploy a Heroku application, you build a virtual machine image called a slug using one or more buildpacks. When a virtual machine instance is launched from this slug, it's called a dyno.

Each dyno runs a single process inside your application virtual machine. Heroku does not officially describe how dynos are provisioned, but anecdotal analysis shows many dynos are run on a single Amazon XL EC2 instance, sharing disk, CPU, and memory across all dynos. There are definitely "noisy neighbors" when sharing resources, but direct data or stats are not provided. I can only share my anecdotal experience that this does indeed happen.

Each dyno is isolated within the EC2 hosting machine, but shares the underlying resources. This is similar to how docker and other application containers work.

Dynos are registered with the Heroku Routing Mesh, an intelligent load balancer that maps incoming web traffic to the application dyno. Each dyno has a TCP port assigned that's registered with the routing mesh.

Heroku is a higher-level service on top of Amazon EC2. They implement deployment, provisioning, monitoring, availability, and auto-scaling at a premium cost to raw EC2 hosting. You can run your own EC2 instances, but need to implement those services yourself.

Disclaimer: I am not a Heroku employee and have no special knowledge of Heroku other than as a user of a large, high traffic Rails app.

UPDATE: Heroku launched PX size dynos this morning, which are hosted on a dedicated EC2 c1.xlarge instance, which solves all of the issues of noisy neighbors and resource contention I alluded to above. At a heft price tag. Details here: https://blog.heroku.com/archives/2014/2/3/heroku-xl

这篇关于一台Heroku Web Dyno究竟是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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