Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2 - Select load balanced MICRO instances or fewer Small Instances?

I'm building a complicated web analytics application, and I'm wondering what you guys think about this.

Is it better to have 6 or so Micro instances or 2 or 3 Small/Medium Instances of EC2?

Some context:

  • Highly reliant on database (RDS)
  • Very dynamic application
  • Highly volatile traffic load
like image 791
John Avatar asked Apr 12 '11 23:04

John


1 Answers

If the load is highly volatile you should be using auto-scaling to bring up and down instances as required. If the traffic can spike pretty quickly, I doubt micro instances are the best one to use, since you generally look at the traffic for 5-10 minutes before making an additional auto-scale change.

A micro instance is a very low assured actual CPU and it might well be that it would be completely overloaded during the cool off time between auto scales, I would select at least a small instance.

The thing with autoscaling is you don't worry about the number of instances, it's only the type. With autoscaling you need detailed monitoring per instance, and that costs almost as much as a micro instance, whereas it's a much lower % of the cost of a small instance or greater.

For that reason, micros very rarely make sense in an auto-scaling setup, out of the two I would strongly suggest smalls (but only 2 by default, auto-scaling is your friend).

Don't rule out something larger than a small either, we had the same problem and settled on 2 medium CPUs as the base.

Also remember that you can reserve instances. So, we purchased reserved instances for the base instances, bringing their cost down by about 55% since they'll always be on, but just use standard instance for the extra load instances.

And the reason for 2 base instances is high availability, put them in different availability zones in your region, since Amazon make each availability zone completely isolated infrastructure from other zones' failure. If high availability isn't an issue currently, default to 1 instance.

like image 197
Thomas the Tank Engine Avatar answered Oct 26 '22 10:10

Thomas the Tank Engine