Search code examples
herokudyno

Heroku Dyno Free Hours


So I have deployed a telegram bot through Heroku. For now I have 550 hours (I have only this app). If i verify my credit card I can get a total of 1000 hours. So... with one app and 1000 hours my app will be forever online right?(excluding the sleeping after 30 minutes, but with Kaffeine I think that I can make it forever online). Just to be sure... I know that after a 30 minutes of inactivity the app will sleep. So even if I use the bot for 1 sec it will consumes 30 minutes; if one user uses the bot at 15.30 and another one at 15.40, it will consume 30 minutes or 60 minutes?


Solution

  • Heroku charges by wall-clock time, so for all minutes your dyno is up.

    When a request comes at h14:00 the applications starts, shutting down at h14:30 if there is no further usage after that single request, total 30 min

    When a second request comes at h14:15 the application is already up and running, shutting down at 14:45 if there is no further usage after the second request, total 45 min

    During the activity (which you are charged for) the app can serve multiple requests without incurring in additional costs.