What exactly is a single Heroku Web Dyno?

amazon-web-services, heroku

Solution

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

Problem

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?

Original source