Top Banner
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Uttara Sridhar Software Developer Engineer a platform to run production containers Amazon EC2 Container Service (ECS)
39

Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

May 20, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Uttara Sridhar

Software Developer Engineer

a platform to run production containers

Amazon EC2 Container Service (ECS)

Page 2: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Agenda

Why Containers?

Cluster Management

ECS Architecture

Use Cases

Q&A

Page 3: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Why Containers?

Page 4: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

What are Containers?

OS virtualization

Process isolation

Images

Automation Server

Guest OS

Bins/Libs Bins/Libs

App2App1

Page 5: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Container advantages

Portable

Flexible

Fast

EfficientServer

Guest OS

Bins/Libs Bins/Libs

App2App1

Page 6: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Services evolve to microservices

Monolithic Application

Order UI User UI Shipping UI

Order

ServiceUser

Service

Shipping

Service

Data

Access

Host 1

Service A

Service B

Host 2

Service B

Service D

Host 3

Service A

Service C

Host 4

Service B

Service C

Page 7: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Containers are natural for microservices

Simple to model

Any app, any language

Image is the version

Test & deploy same artifact

Stateless servers decrease change risk

Page 8: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Why build Amazon ECS?

Page 9: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Server

Guest OS

Bins/Libs Bins/Libs

App2App1

Scheduling one resource is straightforward

Page 10: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Scheduling a cluster is hard

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Server

Guest OS

Page 11: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Some customer challenges

Cluster management

Availability

Scheduling

Security

Monitoring

Integration with AWS services

Page 12: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Cluster Management

Page 13: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Cluster Management: Resource Management

Docker

Task

EC2 Instance

Container

Docker

Task

EC2 Instance

Container

Task

Container

Docker

EC2 Instance

Task

Container

AZ 1 AZ 2

Page 14: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Cluster Management: Scheduling

Docker

Task

EC2 Instance

Container

Docker

Task

EC2 Instance

Container

Task

Container

Docker

EC2 Instance

Task

Container

AZ 1 AZ 2

Page 15: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Cluster Management: Scheduling Systems

Ref: http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/41684.pdf

Page 16: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS

Page 17: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS: Resource Management

Docker

Task

Container Instance

Container

Task

Container

Docker

Task

Container Instance

Container

Task

Container

Docker

Task

Container Instance

Container

Task

Container

AZ 1 AZ 2

Cluster Management Engine

Page 18: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS: Agent Communication

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

AZ 1 AZ 2

Cluster Management Engine

Agent Communication Service

Page 19: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS: Key/Value Store

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

AZ 1 AZ 2

Key/Value Store

Cluster Management Engine

Agent Communication Service

Page 20: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS under the Hood

IDN-1 IDN IDN+1 IDN+2 IDN+3 IDN+4 IDN+5

IDN+6

IDN+5

WRITE

READ

Page 21: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS under the Hood

IDN-1 IDN IDN+1 IDN+2 IDN+3 IDN+4 IDN+5

IDN+6IDN+3

IDN+5IDN+2

WRITE WRITE

READREAD

Page 22: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS: APIs

Docker

Task

Container Instance

Container

ECS Agent

API

Cluster Management Engine

Task

Container

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

AZ 1 AZ 2

Key/Value Store

Agent Communication Service

Page 23: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS: Scheduling

Docker

Task

Container Instance

Container

ECS Agent

ELB

Internet

ELB

User /

Scheduler

API

Cluster Management Engine

Task

Container

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

AZ 1 AZ 2

Key/Value Store

Agent Communication Service

Page 24: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS: Scheduling

Page 25: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS: Scheduling

Page 26: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS: Scheduling

Page 27: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS: Scheduling

Page 28: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Use Cases

Page 29: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Easily Manage Clusters for Any Scale

Nothing to run

Complete state

Control and monitoring

Scale

Page 30: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Scalable

Page 31: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Flexible Container Placement

Applications

Batch jobs

Multiple schedulers

Page 32: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Designed for use with other AWS services

Amazon Virtual Private Cloud

AWS Identity and Access Management

Amazon Elastic Load Balancing

Amazon Elastic Block Store

Amazon CloudWatch

AWS CloudTrail

Page 33: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Extensible

Comprehensive APIs

Custom schedulers

Open source agent and CLI

Page 34: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Common Use Cases

Applications and services

• Configuration and deployment

• Microservices

Batch processing

Page 35: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Case Study: Shippable

With Amazon ECS, we've

practically eliminated the time

our developers spent on ops-

related tasks. Our senior

developers used to spend

80% of their time on back-end

infrastructure management

features, whereas now they

spend 80% of their time on

customer features.

Avi Cavale

CEO & Cofounder

“Shippable is a platform providing hosted continuous integration,

testing, and deployment from repositories. The Shippable

platform consists of two parts: Continuous Integration (CI), and

Continuous Delivery (CD) pipelines.

Built a CICD platform with microservices architecture using

Docker containers on Amazon but their service discovery

solution and monitoring infrastructure was really hard to scale

and manage.

Evaluated many open source options, but wanted a solution

that was simple and would integrate with the AWS ecosystem.

Started using Amazon ECS as a way to offload cluster

management and container orchestration to a service.

Amazon ECS service scheduler manages multiple copies of

each microservice across the ECS cluster, use Amazon ELB for

load-balancing, Amazon Cloudwatch for telemetry and

infrastructure logging, Amazon ECR for storing Docker images.

Shippable

Page 36: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Case Study: Segment

Switching to Amazon ECS has

greatly simplified running a

service without needing to

worry about provisioning or

availability.

Calvin French-Owen

Cofounder and Chief Technology Officer

“Segment provides a service used by businesses to

collect customer data in a single hub for later use in

analytics, marketing, and for other purposes.

Moved from Amazon EC2 instances to Docker containers

and needed a way to manage and schedule containers at

scale for their production environment.

Evaluated many open source options, but wanted a

solution that was simple and would integrate with the

AWS ecosystem. Started using Amazon EC2 Container

Service (Amazon ECS) as a way to offload cluster

management and container orchestration to a service.

Amazon ECS manages placement of containers on

different Amazon EC2 instances across multiple

Availability Zones, providing the Segment service with

better availability.

Page 37: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Amazon ECS

Docker

Task

Container Instance

Amazon

ECS

Container

ECS Agent

ELB

Internet

ELB

User /

Scheduler

API

Cluster Management Engine

Task

Container

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

AZ 1 AZ 2

Key/Value Store

Agent Communication Service

Page 38: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Thank you!

Page 39: Amazon EC2 Container Service (ECS)...Case Study: Segment Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability.

Questions?