Custom Metrics for Amazon CloudWatch

You can now store your business and application metrics in Amazon CloudWatch. You can view graphs, set alarms, and initiate automated actions based on these metrics, just as you can for the metrics that CloudWatch already stores for your AWS resources.

On first sight I was not really impressed. It does not sound really useful, until you dig deeper into the possibilities. For example adding page latency to CloudWatch gives you far better insight WHY your latency rises compared to free server resources.

Here’s an example of the kinds of insights that can be gained when you use custom metrics. The following chart shows the amount of free memory (the jagged line) and the application’s page latency:

As you can see, page latency increases as free memory decreases (looks like there’s some garbage collection going on as well).

But the real awesome feature is the AutoScaling. You can AutoScale your EC2 instances based on not only technical parameters like free memory or CPU usage, but on business rules or user experience as well.

You can use any of the metrics to AutoScale your fleet of Amazon EC2 instances.This means that you could scale up and down on metrics that are only indirectly related to system load or performance, but that may be better indicators of application performance or customer experience: number of registered users, number of active sessions, page load times, or error rates.

I would really love to start testing with this. At Mobypicture we already scale our EC2 instances based on the amount of twitter followers a user has, so we can safely accept all traffic coming at us at once after a VIP sends a Moby, but this opens a whole new range of possibilities!

/via Amazon Web Services Blog: New – Custom Metrics for Amazon CloudWatch

Leave a comment