Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Heroku billing dynos work exactly?

I was trying to understand the Heroku pricing system. Okay so the free account receives 1000 dyno/hour. What's the exact meaning of a dyno/hour? It depends on what? Requests per seconds? Number of users? If i want to switch to the non sleeping offer, i'll have to pay 7$ per dyno. So the 1000 free dynos will cost me 7000$ per month? How many users approximately does 1000 dyno/month support? Thanks.

like image 262
Marc Ibrahim Avatar asked Oct 30 '16 10:10

Marc Ibrahim


1 Answers

Assuming you verify your account with a credit card, you have 1000 free dyno hours per month to play with.

A "dyno hour" is simply one hour of a dyno running.

If you have just 1 app running just 1 dyno, that dyno could be available 24/7 forever, since even a 31 day month consists of 31 x 24 = 744 hours, which is less than the 1000 free dyno hours you have at your disposal.

However, if your one dyno on your one app is a "web dyno" (i.e. a web server), then note that free web dynos sleep after 30 minutes of inactivity (in which case the next request to the web dyno "wakes it up").

Free web-dyno sleeping is a two-edged sword. On the one hand, when a web dyno sleeps, it does not consume any of your free dyno-hours (so you might be able to get more for your 1000 free dyno hours, depending on your needs). If you can tolerate slow response to your web clients in response to any queries that happen to wake up a sleeping dyno - that can be OK. If not, you will need to make sure to keep your web dyno busy (i.e. make sure it does not go 30 minutes without receiving any requests).

For further details see Free Dyno Hours.

Note that a dyno is basically just a virtual machine. It is your "server". One dyno can certainly support many many users, depending on the complexity / performance requirements of your app. You can "scale" your app both "vertically" (meaning increased computing capabilities per dyno) and "horizontally" (meaning running multiple dyno instances that load balance your app's traffic). See What is a Heroku "Dyno"?. Your app would need to be processing absolutely GIGANTIC amounts of traffic to justify scaling a dyno to 1000 instances. If you really need to scale your dynos (highly unlikely if you're only just starting to build your app), you will need to use paid dynos.

like image 58
Yoni Rabinovitch Avatar answered Oct 04 '22 02:10

Yoni Rabinovitch