Auto Scale Heroku Dynos With Hirefire.io
Hirefire.io is a service that auto scales your heroku dynos. It is running both web and worker dynos and scales them according to websites current respond times and non-processed jobs. The setup of this tool is very easy.
If you just want to scale your web dynos you no need to any code changes in your app. You can just sign up to hirefire and make configurations of your website.
If you interested with scaling your worker dynos you must add some codes for counting your non-completed job in the queues. I will explain configuration of
Sidekiq gem. You can find more worker gem configurations from here.
Firstly, we must add
hirefire-resource gem to our
bundle command, we must configure hirefire for watching our queue.
1 2 3 4 5
config.dyno(:worker_dyno_name) must be equal to your worker dyno name in
When you visit
http://localhost:3000/hirefire/development/info you must see something like this:
When you deploy and configure your account from hirefire you can auto scale your dynos.