How to estimate required hosting parameter before release of a web application?
Solution 1:
Shared hosting (i.e., $8/month or the like) is almost certainly not worth it; the minute you have a developer spend 30 minutes of their time looking into and fixing a problem related to the fact that it's shared and on a crappy, oversold machine, you could've paid for a better one.
Above the $8/month option, there are three options to consider:
- VPS ("Virtual Private Servers")
- Dedicated Server
- Cloud
In addition, you should also consider what level of support you need. Are your developers *NIX and PostgreSQL gurus? Even if they are, is that the best use of their time?
In terms of scaling, dedicated servers are going to scale best--and before I get downvotes for saying that, let me explain why. Running PostgreSQL means that scaling the database layer is best done vertically; that is, by adding more RAM and a faster processor. It's relatively-difficult, compared to MySQL at least, to scale horizontally (onto additional servers), requiring things like pooling and many-to-many replication. The issue is that clouds' CPUs aren't all that fast. To name one, the absolute most CPU speed you can squeeze out of Amazon's EC2 comes with their High-CPU offerings, which are 2.5 ECUs per processor. That's nowhere near the performance of a modern CPU that you'd get in a new dedicated machine--each processor does 4,600 or so BogoMIPS, minus virtualization penalties, versus well over 6,500 for even a typical modern CPU. VPS will deliver you the full 6,500 or more, albeit still with virtualization-related performance penalties. A dedicated machine will give you every cycle it has. This excess of speed also means that you can consolidate web and DB on a single machine until you outgrow it.
If you know from the beginning you'll need separation, on the webhead side, clouds give you the ability to scale horizontally very quickly (a few seconds), VPS less so (a few minutes, up to an hour or so), and dedicated servers, the least (anywhere from a few hours to a week or longer). On the bright side, though, you'll "fill up" a cloud webhead quite quickly, because they're so small, whereas a dedicated webhead has the performance of a few dozen cloud ones, and seeing it fill up will be visible well down the road, so you can plan appropriately.
One last thing to consider: price. Now, I'm certain you're already looking at price, but what I'm thinking is, usage-based pricing. VPS and dedicated servers will usually only charge you for bandwidth, and that comes in sizable chunks. Clouds will charge you for every last resource you use. VPS and dedicated servers therefore have predictable bills at the end of the month; a cloud, especially a dynamically-scaling one, can cost you thousands or tens of thousands of dollars if you get DDoSed, for example.