image
Managing Capacity

Contents

Running containers on ECS Fargate
1
Introduction
PREVIEW2m 18s
Start course
Difficulty
Intermediate
Duration
33m
Students
90
Ratings
5/5
Description

This lesson of ECS Fargate aims to simplify your view of container deployments and helps you to see them as tools that give you flexibility and predictability for your application.

Learning Objectives

  • Networking considerations prior to deploying ECS containers
  • IAM Security requirements for your application
  • How to configure your deployment using Task definitions
  • How to manage secrets, parameters, and capacity

Intended Audience

  • DevOps Engineers and System Administrators

Prerequisites

  • General understanding of Docker
  • Basic knowledge of AWS services, such as EC2, S3, and EFS

 

Transcript

One very important consideration when talking about containers is managing the underlying infrastructure. Of course, we're talking about ECS Fargate, so that's not going to be the case here. You're not going to be managing the infrastructure itself. However, you may need to manage the capacity. So, if you're running hundreds of copies, maybe even thousands of copies of your containers, just to be able to keep up with demand, you need to understand capacity providers. 

So, I'm going to throw in this additional lesson just so that you're aware of this even though this is more a topic for ECS traditional as opposed to ECS Fargate because as I mentioned, we're using ECS Fargate and the whole point being is to not have to manage infrastructure. However, that's not always the case because you do have two options when it comes to capacity management in ECS Fargate, and let's take a look at that right now. If we go into our cluster, you see that there's a tab here that says Infrastructure.

So, we click there and there's Capacity providers. This is what manages that particular capacity. If this was a traditional ECS cluster, you would see that here you have an option. You give it a name to the capacity provider and then you specify an Auto Scaling group. In that group, of course, there's going to be a template associated with it, and that template's going to say, "Hey, I need T2 micros, I need T3 mediums, or N fives," or whatever kind of machine you need to run your containers. You're going to define that in there. If we jump over real quick to the documentation, you'll see that you have options when it comes to Capacity providers. But keep in mind that these are mutually exclusive. So, if you specify Auto Scaling and those settings are going to be, as I mentioned, for ECS traditional, so you can't use those. But since we're talking about Fargate, you have the option of either Fargate itself a traditional and Fargate Spot.

People are usually nervous about using Fargate Spot because they think, well, Amazon is going to give me this infrastructure to run my containers, but they might take it away without warning. It's really not that bad. As long as your containers are designed to come and go in a graceful manner, you know that when they receive a certain signal from AWS, your software knows how to properly shut down. You shouldn't have an issue. If you have high availability, let's say, multiple availability zones, and those things are in place, you should be able to set up a good Fargate Spot strategy so that you always have enough capacity to meet the necessary demand for your services. So yes, when you're running Fargate, the Capacity provider by default is going to be called Fargate. But just know that Fargate Spot is also there for you and you should consider it.

 

About the Author
Avatar
Carlos Rivas
Sr. AWS Content Creator
Students
779
Courses
15
Learning Paths
1

Software Development has been my craft for over 2 decades. In recent years, I was introduced to the world of "Infrastructure as Code" and Cloud Computing.
I loved it! -- it re-sparked my interest in staying on the cutting edge of technology.

Colleagues regard me as a mentor and leader in my areas of expertise and also as the person to call when production servers crash and we need the App back online quickly.

My primary skills are:
★ Software Development ( Java, PHP, Python and others )
★ Cloud Computing Design and Implementation
★ DevOps: Continuous Delivery and Integration