til-jasontorres by Jason Torres
Maximizing Heroku's Dyno Cost and Performance
Performance Dynos in Heroku w/ Autoscaling is actually cheaper in the long run and now my recommended setup for serious production applications.
It's overwhelming to look at the pricing ($250/month!) but given our use case, we've been going over that range already. So we need to explore some alternative options, our applications doesn't run in full capacity the whole day -- by average is only active during UK day time. After tweaking our configuration, the server runs at 1x the rest of the off-peak hours. For 2 days of testing under Performance Dynos we've only clocked in about $25 which is about an average of $12/day. Whoa!
Doing the math further with our previous setup:
We used to run about 10 dynos constantly throughout the month. Sometimes I scale it to 15 dynos if needed on certain peak times.
Comparing the setups
- Previous setup: 10 dynos x $50 at $500/month
- Current setup: 1x-4x Performance Dyno at $12/day scaling up and down on a 12 hour time period = $12 * 30 = $360/month
It makes a big difference in costs together with more processing power.
If the dyno cost reaches more than $250/month, it's better to start w/ 1 dyno performance x1 then autoscales to you. You'll get more bang for the buck in the end.