Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

How can I go about/what is the best way of estimating what kind of server resources I will require at the launch of a new project. Let's say for instance I'd gathered 10k users email addresses that opted-in to be informed when we launch.

I didn't really want to go for a cloud solution at the moment. Should I just get a reasonably-specced dedicated server and go from there, or should I be looking at services like Amazon EC2? Or should I start out with EC2 for the fully-flexible resources, then once things stabilize I'll be able to sort a fixed hosting deal that is adequate elsewhere?

Sub-question: What's a good way of estimating what load a particular application will place on the server per user?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

Generally speaking, in my experience, everyone tends to overestimate the quantity of resources that a website will consume.

As ever, it's a money/capacity pay-off. Unless you're expecting 30/40GB of bandwidth usage monthly from word go, I'd recommend starting off in a standard shared hosting package.

The main problem when hosting sites these days isn't really as much sustained usage, it's high-peaks caused by social media and mailouts. If you can guarantee every one of those 10,000 email recipients will click on your email, then I'd get a dedicated server.

EC2 is more flexible, but it will cost more than a dedicated solution. It only really comes into it's own price wise if you you can use it to automatically spool up and down instances as your load requires. Saying that EC2 does not handle instant load spikes at all well. If you are expecting a tweeter with 150,000+ followers to tweet a link to your site (@notch), you should either be hosting on a cluster, with caching, or have used 'siege' to hit EC2 first with a shed-load of traffic, so it spools up.

Technically speaking, a dedicated system is a lot easier to maintain and work with than EC2 - you have full control over everything. A lot in EC2 is up to amazon, and those instances can do some strange things that you'll never get to the bottom of. Be prepared to configure your ec2 instances to be totally easy and quick to throw-away; it's best to have automatic systems that detects and restarts failed instances. Whilst using a load-balancer you'll find (mostly) that everything works.

Additionally, what resources you need also depends on how much work your webserver has to do to send out the web-page to visitors. A static html site? I've seen stupidly large TV-show-driven traffic spikes coped with easily by a single core P4, 1GB RAM, Apache2-mpm-prefork machine, simply because there was absolutely no dynamic content whatsoever. Prefork because we'd not been told there was no dynamic content, php was enabled, but not used.

siege / ab (apache benchmark) are both awesome tools, that you should use to test what your site can cope with. A concurrency above 50 is highly unusual unless you're @notch'ed etc. Siege is the more advanced tool, it can pretend to be a web-visitor more completely. Running it from multiple internet connections simultaneously is best if you're using any form of load-balancer, and run it with a list of urls.

Make sure you use caching solutions - if you're using wordpress, use a caching plugin. Be prepared to get into the technicalities as deep as configuring an op-code cacher for php. Don't be afraid to ask for help, and you could always (being slightly cheeky) call in the experts :)

Disclaimer/source: I'm a techy working at http://positive-internet.com

share|improve this answer
    
Thanks Kirrus, that was incredibly informative. –  Anonymous Jun 10 '12 at 13:40
add comment

If you get a dedicated server and reach your resources limit you'll be stuck having to setup a cloud based server and migrate all that data. At least with ec2 you can bring up another server setup a load balancer and minimize downtime.

To estimate how many resources a single user on your application will take up. Use these linux applications

Terminal scripts bmon for monitoring bandwidth in and out usage vmstat for monitoring memory

Run these scripts while logged in to a single users account, add edit data as any new user would and execute any programs or applications the user would in a day. Check the logs from bmon, and vmstat and you can scale up to estimate usage. You can even plug this data into Amazon calculator to see what the usage would be.

If your application uses cron to run any tasks say daily. You should consider using the ec2 API to bring a server (instance) up online execute the tasks then take it offline so you're not billed 24/7 when you only needed to run those administrative tasks for a few minutes or hours. That'll save you some money.

share|improve this answer
    
EC2 it's a good idea as Anagio is saying. As for load test I would use siege, (stress-tester) –  milo5b Jun 10 '12 at 12:42
add comment

Your Answer

 
discard

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.