3

I'm planning to host a website where in the first phase I would target 30,000 users. It is in php and runs on Apache server. I'm assuming 8,000 users can be online in worst case scenario and 1000 of them will be uploading photographs.

A photograph will be resized to around 1MB at client side and one HTTP request is uploading only one photograph.

My plan:

  • 2 Small EC2 instances to run Apache httpd
  • 2 Small EC2 instances to DB (Postgresql). I to write data and other its read replica.
  • EBS volumes for DBs
  • Last, Amazon S3 for uploaded photographs.

My question here

  • Is Small EC2 instance more than what I require. I mean should I go for micro
  • Is 8000 simultaneous user a right no. (to decide what EC2 instance to choose) for a new website
  • Or should I go for Small instance so to make it capable of spikes
Mayank
  • 199
  • 1
  • 8

3 Answers3

4

i would recommend you to start with Big (Amazon load balancer with 2 large instances, and then if resources are still free after heavy load, then you can scale down after that. because, if you start with small instance, and if it failed to pick the load (which has large chance) then users will face downtime (when you will be upgrading to to medium or large instance) and if that instance still did not fulfilled your request, then you will have to do this step again. so Hope for the Best and prepare for the WORST. i have myself hosted a site of about 10,000 to 15,000 users, for which i had to use 6 Large instances of of apache server and one Large MySQL RDS. right now the load is fine, so we might want to remove 1-2 instances from load balancer. but imagine, if i had made 2-3 small instances? just after the load would come, the servers would crash.

(Dont worry too much about the price, as surely amazon charges you for what you use, but the charges are on per hour basis, and those charges are not that much heavy that you cannot afford. Also,

DO run a benchmark of your setup before launching it, you can use Apache JMeter ,HP loadtester, AB(apache benchmark).

Farhan
  • 4,210
  • 9
  • 47
  • 76
  • 15000 users take 6 large EC2!! Could you please provide a link to your website, if possible. – Mayank Nov 15 '11 at 17:26
1

i think you should start out with a micro instance, they are listed to be included in your subscription of AWS, but just be careful; Amazon charges for everything. Then when the demand of your site increases, spin up more instances and through it behind a load balancer.

just my advice.

Robert Van Sant
  • 259
  • 2
  • 6
  • 1
    I'd just add myself to this advice. Anyway, site is not likely to have 8000 users on day 1 and there will be time to move to small or large. – Sandman4 Nov 11 '11 at 14:35
1

my advice is to use a service that runs the instances for you and allow more instances to be added as traffic grows.

We use Scalr for that there is also rightscale, heruko makara, cloud foundry and others. It would be easier for you to get into EC2 if you use ready AMIs from a cloud management service rather than developing your application and then thinking of how to transform it to a cloud management environment.

Niro
  • 1,371
  • 3
  • 17
  • 35