Skip to content

Latest commit

 

History

History

ECS

ECS Notes


Useful Libs and Tools


Useful Articles and Blogs

ℹ️ Predictive Auto-Scaling only supports by EC2, not ECS. See Container Roadmap


Fargate

  • Fargate does not give same cpu capacity for each task.
    • Just be aware on Fargate you can get c or m series instances under the hood. If doing fine grained perf testing dump out `/proc/cpuinfo`` on the task to see what CPU you really have on Fargate.

Mapping Fargate cpu to EC2 instance type

For Fargate cpu size e.g., 16384

  • Considering 1024 units are 1vCPU
  • 16384/1024 = 16 vCPU
  • which matches c7g.4xlarge

Building Container images in containers


ECS - ENI trunking

(Source)

ℹ️ This feature is not available on Fargate.

Each ECS task that uses the awsvpc network mode receives its own ENI, which is attached to the container instance that hosts it. There is a default limit to the number of network interfaces that can be attached to an EC2 instance, and the primary network interface counts as one.

ECS supports launching container instances with increased ENI density using supported EC2 instance types. When you use these instance types and opt in to the awsvpcTrunking account setting, additional ENIs are available on newly launched container instances. This configuration allows you to place more tasks using the awsvpc network mode on each container instance.

Example: c5.large instance

  • By default, a c5.large instance may have up to 3 ENIs attached to it.
    • The primary network interface for the instance counts as 1.
    • Each task using the awsvpc network mode requires an ENI, you can typically only run 2 such tasks on this instance type.
  • With awsvpcTrunking enabled, a c5.large instance has an increased ENI limit of 12.
    • The container instance will have the primary network interface, and
    • ECS creates and attaches a "trunk" network interface to the container instance,
    • So this configuration allows you to launch 10 tasks on the container instance instead of the current 2 tasks.