How many dynos would require to host a static website on Heroku?

Gbert90 picture Gbert90 · May 12, 2012 · Viewed 8.2k times · Source

I want to host a static website on Heroku, but not sure how many dynos to start off with.

It says on this page: https://devcenter.heroku.com/articles/dyno-requests that the number of requests a dyno can serve, depends on the language and framework used. But I have also read somewhere that 1 dyno only handles one request at a time.

A little confused here, should 1 web dyno be enough to host a static website with very small traffic (<1000 views/month, <10/hour)? And how would you go about estimating additional use of dynos as traffic starts to increase?

Hope I worded my question correctly. Would really appreciate your input, thanks in advance!

Answer

John Beynon picture John Beynon · May 12, 2012

A little miffed since I had a perfectly valid answer deleted but here's another attempt.

Heroku dynos are single threaded, so they are capable of dealing with a single request at a time. If you had a dynamic page (php, ruby etc) then you would look at how long a page takes to respond at the server, say it took 250ms to respond then a single dyno could deal with 4 requests a second. Adding more dynos increases concurrency NOT performance. So if you had 2 dynos, in this scenario you be able to deal with 8 requests per second.

Since you're only talking static pages, their response time should be much faster than this. Your best way to identify if you need more is to look at your heroku log output and see if you have sustained levels of the 'queue' value; this means that the dynos are unable to keep up and requests are being queued for processing.