At first glance, using a Micro EC2 instance might seem sensible from a cost standpoint. Micro instances are free for 750 hours each month and, once costs begin to accrue, they are cheapest deployable instance type.
However there is a caveat you should be aware of: although Micro instances can offer constant performance, they are really designed for short bursts. If you use your Micro instance incorrectly, it may shut down at very inopportune moments due to overutilization.
The following discussion illustrates this point:
As one its features, CloudCheckr provides a cost utilization report that measures CPU Utilization of EC2 Instances from CloudWatch metrics. We use in-house configuration files to test both our reports and CloudWatch metrics. Using our utility, we spun up a Micro instance configured to consume 20% CPU.
After 30 minutes, although my task manager showed instance consumption at 20% of capacity, the Cloud Watch data for this instance displayed steady line at 100%. Below is a blended screen shot:
To verify that our utility was functioning correctly, created a medium instance and installed my utility with the same configuration (20% CPU). After thirty minutes I compared the data of my new instance.
As shown, both the utility and the CloudWatch data fit expectations – constantly hovering just over 20%.
Why the discrepancy?
The discrepancy in the metrics relates to the functioning purpose of the instance. Where as other instances are designed to function at their “max performance” continuously, Micro instances offer peak bursts and are best used only in situations that require periodic additional compute cycles.
The AWS documentation describes this issue as follows (micro instances):
The instance is designed to operate with its CPU usage at essentially only two levels: the normal low background level, and then at brief spiked levels much higher than the background level.
Why does this matter?
If you are planning to use a single micro instance to host a website, you’ll want to put some thought into it. A steady stream of traffic for more than 10 seconds or so may render your site inaccessible until the CPU is under control again (a common scenario would be a bot scanning a site with a lot of content).
What should you do?
So remember that Micro instances are designed to handle low traffic (tens of requests per minute) and higher traffic may require the use of Auto Scaling groups for additional micro instances, or even a larger instance type.
Keep up with the Latest in Cloud
Check out our Resources Center for cloud industry news, research, webinars, and more.