Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

heroku

hosting

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!

like image 513
Gbert90 Avatar asked May 11 '12 23:05

Gbert90


1 Answers

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.

like image 147
John Beynon Avatar answered Oct 24 '22 19:10

John Beynon