Fargate is a new compute engine for Amazon ECS that allows you to very easily run Docker containers for your applications without having to manage any underlying virtual machines.
engine for Amazon ECS. • It allows you to very easily run Docker containers in the cloud. • Focus on building your application instead of worrying about managing infrastructure. • It is an alternative Launch Type to EC2.
run a containerised application on a cluster of EC2 instances that you manage. Containers are placed onto an instance based on resource requirements and placement strategy (binpack, random, spread).
x vCPU, 4 GB RAM = $0.052 per hour. Reserved Instance Pricing (1 year all up front) t2.medium – 2 x vCPU, 4 GB RAM = $0.034 per hour equivalent. Pricing is per second with a 60 second minimum.
$0.09312 4GB RAM = $0.02044 Hourly cost = $0.11356 Pricing is per second with a 60 second minimum. Duration includes the time to pull in the container image.
images, particularly security updates. • Less complexity. • Flexibility. It’s quick and easy to spin up new containers. • Scalability, no need to worry about availability of host resources. • Network rules per container. • Security rules per container. • You only pay for what you use.
usage. Higher than EC2 instance of the same specification, fully utilised, running 24/7. • No easy access via docker exec from the host (needs SSH agent). • Must use a log aggregator, for example Cloud Watch or an ELK stack. • Lack of control over host type e.g. CPU optimised instance – e.g. not good for machine learning! • Longer spinup times. • No persistent filesystem access (use S3!).
a simple life, no need to worry about security patching and general host maintenance. • For micro services. Easy and unrestrained horizontal scaling. Spin up 1000s of containers in seconds. • Applications where you require container level network or security rules (e.g. Intranet). • Short lived instances, e.g. message queue consumers.
approach. • Our monolith primary application runs on m4.xlarge EC2 instances. The primary reason for this is burst-able resource usage, containers can “borrow” from the host when required. • All our MQ consumers run on Fargate as we scale up and down frequently for processing finance proposal sends and decisions. • Our non Monolithic Micro Service apps run on Fargate. • Our Intranet runs on Fargate, due to security requirements.