AWS Partner Network (APN) Blog

Amazon ECS Resource and Cost Allocation Made Easy with CloudHealth Container Module

CloudHealth_logo-1
CloudHealth-logo-2
Connect with CloudHealth-1
Rate CloudHealth-1

By Alex Shipley, Solutions Architect at CloudHealth Technologies

If you have been successful in pushing your organization to adopt containers, your teams can now work faster and more efficiently. But there are still a few obstacles you need to overcome before you can declare overall success.

Despite your teams now sharing a pool of resources, tracking usage and allocating costs has likely become more challenging. You know how much each cluster costs thanks to Amazon Elastic Container Service (Amazon ECS), but internal showback and chargeback reporting are problems you may not know how to overcome just yet.

Luckily, CloudHealth Technologies announced a solution to this problem in November 2017 and recently added support for Amazon ECS as well as Amazon Elastic Container Service for Kubernetes (Amazon EKS). Today, leading organizations around the world such as Yelp and Segment are using CloudHealth to understand what’s driving the cost of their Amazon ECS, Kubernetes, and Mesos clusters.

CloudHealth Container Module fully enables users to customize what and how to report on container usage and costs. Starting at the cluster level, it’s useful to compare the amount of resources allocated to container tasks to the available capacity of the cluster.

In this post, we discuss how CloudHealth’s support for Amazon ECS helps you understand your Amazon Web Services (AWS) resource usage and cost. CloudHealth is an AWS Partner Network (APN) Advanced Technology Partner with AWS Competencies in Migration, Education, and Cloud Management Tools.

Simplifying Your Amazon ECS Environment

Do you have too much capacity, leading to underutilized resources and wasted cost, or are you running out of capacity and need to consider scaling up? What types of instances make up your clusters, and do you know if they are the right instances? What about tracking a particular team’s consumption as compared to their allocated budget? And how much does your Amazon ECS or Amazon EKS environment actually cost?

In order to answer these questions, you need to track several metrics, namely available and used CPU, memory, and disk, and then be able to attribute them to individual tasks, services, and groups. By tracking these metrics and more, you can build a complete picture of how to optimally manage your Amazon ECS resources.

Let’s look at our cluster broken out by instance type. Here, we’re looking to see if the allocated resources align with our expectations, based on instance family.

In Figure 1, it’s apparent that we have plenty of available CPU hours which can be rightsized. If this trend continues, Amazon ECS may not be able to assign container tasks despite having plenty of CPU resources left available.

ECS Resource Cost Allocation-1

Figure 1 – Understand your resource allocation with ease.

At this point, we can look at changing the instance family in the cluster to more closely align with the needs of our container tasks.

Figure 2 highlights how easy it is to understand resource allocation by instance type and optimizing them to avoid over-provisioning resources. In the example below, many of the c-family instances look well utilized, but one thing that jumps out is the r4.large instances.

I can quickly see we are only using 30 percent of our memory resources, and given that r-family instances are memory optimized, this makes me wonder if this is the right instance type to have in the cluster.

ECS Resource Cost Allocation-2

Figure 2 – Resource utilization by instance type.

Demystifying Resource Allocation

Looking beyond the cluster level, CloudHealth Container Module can track how a cluster’s resources were allocated to specific container tasks, services, or functions.

Do you want to know which tasks were requesting the most CPU or memory resources? Need to report on containers by label, task, or something else? Is one group being a resource hog and using too much of the cluster? Using the Amazon ECS Allocation Report shown in Figure 3, customers can identify resource consumption across task families.

CloudHealth Container Module is able to provide you the tools to answer these questions by leveraging Amazon CloudWatch. Like other AWS services, Amazon ECS generates CloudWatch events for state changes that will be gathered and stored in an Amazon Simple Storage Service (Amazon S3) bucket.

A policy, specifying a designated CloudHealth role, is associated with the bucket permitting CloudHealth to retrieve objects for subsequent processing. CloudHealth digests the Amazon ECS events in order to report cluster cost allocation and utilization.

ECS Resource Cost Allocation-3

Figure 3 – Resource allocation demystified with the Amazon ECS Allocation Report.

Container Cost at Your Fingertips

Lastly, you need to understand how much each of these tasks, task families, or services is costing you, including all of the downstream dependencies. With CloudHealth Container Module, you can even decide how to allocate container costs—by CPU, memory, or a custom combination.

Since Amazon ECS is a free service, understanding how much your cluster tasks cost isn’t as simple as just looking at your AWS bill. You need to understand what portion of the infrastructure each task is using, map all of the dependencies (load balancers, volumes, etc.) and then apportion it correctly. With CloudHealth Container Module, you can chose to allocate costs based on CPU consumption, memory consumption, or a custom combination of the two.

Figure 4 shows a sample container cost history report that CloudHealth customers can use to track this. You will also want to see this in the context of your non-containerized costs, since many applications will have both containerized and non-containerized components. Luckily, CloudHealth can show you all of this in our Container Cost History Report.

ECS Resource Cost Allocation-4

Figure 4 – Container Cost History Report.

Schedule a Demo

If you’ve adopted containers but haven’t examined how efficient your clusters are, now is the time. By partnering with CloudHealth, we can help you answer tough questions and gain the in-depth analysis you need to allocate costs and drive efficiency.

If you’d like to learn more about how to extend CloudHealth Container Module to work with Amazon ECS or other container orchestration engines, we encourage you to set up a 15-minute demo for us to explain our approach to container cost allocation by CPU and memory usage.

The content and opinions in this blog are those of the third party author and AWS is not responsible for the content or accuracy of this post.

.


CloudHealth_logo-1
AWS Competency_biz cards-2

CloudHealth – APN Partner Spotlight

CloudHealth is an APN Advanced Technology Partner. They give enterprises the ability to optimize and govern on-premises and AWS environments to drive confident decision-making and smarter growth.

Contact CloudHealth | Practice Overview | Buy on Marketplace

*Already worked with CloudHealth? Rate this Partner

*To review an APN Partner, you must be an AWS customer that has worked with them directly on a project.