Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly is a single Heroku Web Dyno?

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?

like image 756
B Seven Avatar asked Jan 30 '14 16:01

B Seven


People also ask

What is a web dyno Heroku?

But what exactly are Heroku Dynos and why are they important? As explained in Heroku's docs, Dynos are simply lightweight Linux containers dedicated to running your application processes. At the most basic level, a newly deployed app to Heroku will be supported by one Dyno for running web processes.

How many dynos can you have on Heroku?

By default, applications are limited to 100 total dynos across all process types. Additionally, a single process type that uses performance dynos can't be scaled to more than 10 dynos. Submit a request to raise this limit for your application.

How long does a Heroku dyno last?

Starting today, Heroku accounts have an account-based pool of free dyno hours for use on free apps. This replaces the 18 hours a day limit on free apps, allowing a free app to run 24/7 if needed. New accounts receive 550 free dyno hours and you can verify your identity with a credit card for an additional 450 hours.


1 Answers

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

like image 157
Winfield Avatar answered Oct 04 '22 14:10

Winfield