Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between four 1X dynos and two 2X dynos in heroku?

Tags:

heroku

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!

like image 291
Madhan Avatar asked Feb 24 '14 23:02

Madhan


People also ask

How many Heroku dynos do I need?

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.

What are dynos in Heroku?

The containers used at Heroku are called “dynos.” Dynos are isolated, virtualized Linux containers that are designed to execute code based on a user-specified command. Your app can scale to any specified number of dynos based on its resource demands.

How are dynos calculated Heroku?

Free dyno hours are calculated whenever a free web dyno is running and we stop calculating when the free web dyno goes to sleep. (If a free web dyno doesn't receive a request for 30mins it will "sleep" so we will no longer count towards the quota until a request is made and the free web dyno boots again.)

How many requests per second can Heroku handle?

Low-medium scale tests These may be conducted without any need for approval from Heroku, so long as they're limited to 10,000 requests/second for any given application. This applies to all regions for the Common Runtime.


2 Answers

The actual data changed since the accepted answer was posted.

The current difference is the memory (512MB for 1x and 1024MB for 2x), as well as the CPU share that is doubled for 2x.

More details can be found on the following Heroku dev center page: https://devcenter.heroku.com/articles/dyno-types

like image 40
Jacek Avatar answered Oct 07 '22 06:10

Jacek


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.

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

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 have recently added PX dynos as well, which have significantly more power available.

You can read about the different dynos Heroku offers on their website.

like image 94
jordelver Avatar answered Oct 07 '22 04:10

jordelver