Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJoe Bruno
35,909 PointsHeroku Pricing & Real Life Money: Some Needed Advice!
Hey All,
I am currently building a rails application and will probably deploy the application using Heroku; however, I am a bit confused. My application is fairly small - when I pushed it to Heroku it was only 11.5MB. The project is a rails membership site utilizing bootstrap, cancan, devise, and stripe. Most of the content is text - with a normal amount of picture and will probably have one or two promo videos. With Heroku, do you pay for the size of the project, how many resources it takes to run it, how much traffic your site receives, etc?
I would love to see some real life numbers!
If you use Heroku for a rails application, how many monthly visitors do you receive, how large is your application and how much is your Heroku monthly bill?
Thanks in Advance!
Joe
8 Answers
Alexander Smith
2,769 PointsIsn't the advantage of Heroku the instant scaling? Just scale up as needed.
Joe Bruno
35,909 PointsYes, but how do you PREDICT when you will need to scale up and how much you will need to scale up?
James Barnett
39,199 PointsJoe - In order to predict how a site will need to scale you would need to either, extrapolate from historical traffic growth.
That or the ability to predict the future
Joe Bruno
35,909 PointsCome on - someone has to have a tangible, real life example. Treehouse Staff, a number of you have done rails projects and the training videos here at treehouse even deploy to heroku! Give me some numbers por favor :) Assuming say 5000 (or whatever) hits daily with the above info, how much is that going to cost to run?
Alexander Smith
2,769 PointsThere are way to many variables. I mean a script checking the date isn't going to be nearly as intensive as a forum for example.
Moiz Malik
11,906 PointsThe answer is that it's hard to say. I'm doing some client work right now, the bill is around ($106/month). 3 web dynos and 1 worker dyno.
The Dyno thing is different depending on the app. Right now, only one feature requires background tasks, and I think we're probably going to change the functionality so that it no longer requires that background task, which would save us $30/month.
But I think I could probably scale down the web dynos if I spent some time optimizing my Rails code too.
Joe Bruno
35,909 PointsThanks Moiz. So what effects the price the most is the tasks executed by the app - which would be directly related to web traffic since more visits, more tasks executed, correct? What sort of traffic does you app receive approximately?
Moiz Malik
11,906 PointsSorry for the late response. Been busy with that aforementioned client work.
Sort of. I'll explain the background tasks thing.
The website is a real estate company based out of Brooklyn. Neighborhood matters tremendously in Brooklyn. So, we have this feature where, if you click on an apartment show page, it has some neighborhood pictures towards the bottom of the page that are pulled directly from the Instagram API. The pictures are being grabbed from the companies various agents Instagram accounts.
We're using the Public API to grab the images, so there are limits on how many requests you can make. So we make the request for neighborhood photos every few hours and cache the results until the next request.
If we were making the requests every time the page loads, we would hit the max amount that Instagram's public API allows for. So instead we use the background task to care of it. We're moving away from this feature, and instead just allowing agents to upload neighborhood pictures directly into the website, thereby getting rid of that use case/need for the worker.
That's a super specific use case, but that's why it's so hard to say about other applications. Background tasks could either be super important to your application, or not really matter at all.
This is what the traffic has been like for the past month.