The containers track at AWS Builders Day kicked of with a State of Union on Containers at AWS. The session was presented by Abby Fuller (@abbyfuller), an AWS Evangelist. This is my ‘live’ blog of Abby’s session.
Abby started the session with a brief overview on what are containers and why are people using them. Whilst most in the audience could be assumed to already know these details, Abby said she often finds someone at the end of a session come up and ask her the basics. It also good to remind people of the basics and why containers are becoming such a key part of application infrastructure.
So, containers are a self contained package which includes everything it needs to run. The most popular platform for containers is Docker. Whilst the self contained package concept could sound familiar to a VM, the fundamental difference is containers are isolated but they share the underlying OS.
Containers can be seen as a response to monolithic applications where everything running an app is integrated and the changing of one component means redeploying all or large parts of the application. There was/is a desire to build something much more flexible, this is where containers can help.
AWS and Containers
AWS container story started in 2014. But even before that, customers had been running Docker on top of EC2 and many, many customers still do.
Monolithic apps aren’t great but from an infrastructure perspective they can be fairly easy to manage. With containers this can get complex fast, as there can be 100s, sometimes 1000s to manage.
AWS ECS does cluster management, container orchestration, and has deep integration with other AWS services, such as Route 53 for service discovery and ELB for load balancing.
Example usage of ECS is by the analytics company, Segment. Segment, process 160 billion analytics events a month on ECS. They also use ECS for ETL jobs, which they then dump the output into Redshift.
ECS isn’t the only way to do things. AWS found more people run Kubernetes on EC2 than anywhere else. For example, the UK bank Monzo have 350 micro services running on Kubernetes in EC2. They use Direct Connect to connect to back to any bank services that can’t run in AWS.
“Deploying Kubernetes in a highly available configuration on AWS is not for the faint of heart and requires you to get familiar with its internals, but we are very pleased with the results.” Oliver Beattie, Head of Engineering at Monzo.
As Monzo alluded to, HA can be tricky to setup with Kubernetes. It requires multi masters, a highly available etcd setup etc. The frequent ask for AWS was to run Kubernetes for the customer. So AWS built EKS. Not ‘special’ kubernetes, just regular Kubernetes project code.
ECS and EKS are great but aren’t everything. You still need to manage EC2 instances.
So AWS introduced Fargate. No cluster or infrastructure to manage or scale. Focus on the workload, nothing else. Pass it a task definition or pod (coming in 2018) and it manages it for you. A task is to run one or more containers.
With ECS and EKS, containers are now considered a fundamental compute primitive.
But with Fargate, instead, treat tasks as fundamental compute primitive. Such as IAM roles and users, tasks for auto scaling, tasks for configuring load balancing, a task for networking.
Lots of Options
Companies such as Ticketmaster and Buzzfeed are using AWS container services for services such as ticket and imaging processing. There are lots of options for running containers on AWS.
There is no such thing as the right tool, only the right tool for you. It matters that the tool can scale, support your workload, and be manageable. You don’t have to pick one tool, use a mixture and a container can move between different services.
ECS – Currently available in pretty much all regions. Its the easiest way to deploy and manage containers, integrates with entire AWS platform. Lots of new features added in 2017, including support for all three of AWS load balancers, supports event schedulers, has more regions, supports Windows containers. Provides sensible defaults so you can’t trip yourself up too much but options to customise if needed.
EKS – Only in limited preview at present. Its a managed Kubernetes control plane, which is highly available, supports automated upgrades (which you can opt out of ), has integration with some other AWS services.
Fargate – “containers on demand” (not the official title!). Currently Fargate is suported from ECS, but will have a mode for EKS at some point in 2018.
Read Nathan Peck’s blog article for a good guide on how you might select between ECS, EKS and Fargate; Choosing your container environment on AWS with ECS, EKS, and Fargate
Whats Next and Where to Find Out More
The main road map item for AWS is more focus on the task as a primitive.
The roadmap is driven by feedback, especially on Twitter. Use #awswishlist hashtag, AWS do look at this, including AWS support.
Abby listed a bunch of resources listed in her slide deck, but especially recommended Nathan Peck’s blog on Medium. She also highlighted two Slack channels; awsdevelopers.slack.com and amazon-ecs.slack.com.