Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting ready to launch a site I've been working on, and am talking to some bloggers. It's planned to go live next week and press will write about it when it does.

But the thing is, this is my first time launching something that I've coded myself. I've founded a startup before but my role wasn't coding then. I taught myself to code to build this. I know the typical traffic pattern for getting covered on large blogs is they bring you loads of people and then the traffic dies down the next day.

I'm afraid of this spike in traffic since this is my first time and I don't know what to expect. I don't want to be one of those websites that get covered and goes down. So far I've been testing it with a small number of people and that didn't cause any problems. I d

The specs are as follows:

A. Using Heroku free hosting (1 dyno)

B. The service is a web app, built with Ruby on Rails.

C. The UI consists of:

  1. Main page: a feed where you follow people and tags. Didn't do much query optimization.
  2. Content page: entirely utilizes external APIs to serve content. No content is served from my server except for small sized metadata.

Can someone provide advice on something like this? How many dynos should I be running? How do I know when I need to expand? What should I expect and how can I prepare? Thank you!

share|improve this question
up vote 3 down vote accepted

The most important thing here will be watching your logs (heroku logs -t) and having New Relic installed in your application as there is no automatic scaling provided by Heroku.

In your logs the following line will be the most important

2012-06-01T07:48:40+00:00 heroku[router]: GET dyno=web.1 queue=0 wait=0ms service=162ms status=200 bytes=23441

specifically the value of the queue attribute. If this number starts increasing it means that your current level of dynos are unable to keep up the number of requests so they are being queued, this number may drop but if it is at a sustained level it's time to start increasing the number of dynos. You may need to increase to a higher amount to clear the backlog before dropping it back to a higher value than before but lower than the amount needed to clear the backlog.

Since your launch maybe more staggered over time rather than TV advertising you may need to set your dynos high to be able to cope rather than actively monitoring it after launch. New Relic will show you 'back log' on the dynos tab which is the same as the queue value so you'd need to take a look at this if you leave the site alone for a period of time to see how it's been performing. You may also make use of the Progstr ( addon which will watch your logs for you and notify you of critical things (like back logs, timeouts etc)

Don't be too afraid here - I've hosted sites on Heroku that have been under heavy usage after prime time TV advertising and at some times have been running close to 50 dynos and only end up with a bill of a few dollars since it's not sustained for long periods of time.

Hope that helps.

share|improve this answer

Hosting companies I have worked for are usually able to help you with this kind of thing. It will cause them problems too, if you spike and are not ready for it, as they usually host a great number of clients on a small pool of mahines/servers.. It might be wise to contact them, and ask them what tips or pointers they can provide you. We were able to move people to different servers, increase memory available to them, or even move them to their OWN server if they were willing to pay for this service, and the bigger dedicated server. So there is a great chance they can help you. Good luck, and I hope this helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.