SlideShare uma empresa Scribd logo
1 de 39
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ECS Service Discovery
S h u b h a R a o , S r . P r o d u c t M a n a g e r , E l a s t i c C o n t a i n e r S e r v i c e
A l e x a n d r M o r o z , S r . P r o d u c t M a n a g e r , R o u t e 5 3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application communication is evolving
Functional calls
Find endpoints,
then connect
Across the room
Dynamic name,
number, and location
Across cities 1:1
Known endpoints, APIs
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Developers need to connect micro services
Build apps
invoking other
services by name
Ensure that service
name resolves to
correct IP/port
DEV OPS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is Service Discovery?
“Where is Service X?”
Friendly name -> IP + port
E.g., app: {10.0.4.5:8080, 10.0.4.6:8080 }
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why is it non trivial?
Dynamic by design:
Number of containers & instances
Auto assigned IP addresses & ports
Placement, scheduling, scaling
Deployments and upgrades
Health and connectivity
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
C u rre n t p at te r n s r e qu ir e in stall, se t u p an d m an ag e m e n t
Load Balancers Key-value store Service Mesh
Service
registry
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Decision criteria
Service registry
Discovery mechanism
Server side or client side
Registration mechanism
Third party or application framework
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
E.g.,
Load Balancer
Benefits
Client is simpler
Drawbacks
Install, manage
Availability, capacity
More hops
Load Balancers – Server Side Discovery
Client
Server
Server
Server
Request Request
LB +
Service
Registry
Register
Register
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DNS based – Client Side Discovery
E.g.,
Route 53 Based
Benefits
Fewer hops
Drawbacks
Client must be registry aware
Client implements discovery logic
Client
Server
Server
Server
Service
Registry
Request
Register
Register
Register
Query
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Requires registrations by agents
E.g.,
Consul, Etcd and Zookeeper
Benefits
Registrar registers, unregisters
and performs health checks
Service less complex
Drawbacks
State may not reflect whether service can
handle requests, only active or unavailable
Install, configure and manage other
component, unless it is a part of infrastructure
Server
Server
Server
Service
Registry
Update Start, stop,
health change
Registrar/
service manager
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Requires registrations by agents
E.g.,
Consul, Etcd and Zookeeper
Benefits
Registrar registers, unregisters
and performs health checks
Service less complex
Drawbacks
State may not reflect whether service
can handle requests, only active or
unavailable
Install, configure and manage other
component, unless it is a part of
infrastructure
Client
Server
Server
Client
Key
Value
Service
Registry
Registrator
Server
Client
Key
Value
Key
Value
Master
Key
Value
Service
Registry
Key
Value
Key
Value
Master
Registrator
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customers want it simpler!
Predictable
Names
for services
Auto updated
with latest,
healthy IP, port
Managed: No
overhead of
installation or
monitoring
High availability,
high scale
Extensible:
Flexible
boundaries for
auto discovery
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Introducing managed service discovery for ECS
You build apps where
services are invoked by
name & name resolves
to IP/port dynamically
You turn on service
discovery during
deployment —
service creation
DEV OPS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ECS service discovery is powered by Route 53
ECS updates service registry based
on naming convention, task
registrations, de-registrations
and health
Route 53 provides Service Registry
Route 53ECS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What’s new?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Route 53 provides Service Registry
Route 53 provides APIs to create
• Namespace
• CNAME per service autoname
• A records per task IP
• SRV records per task IP + port
More details later in the presentation
Service
CNAME: A / SRV record
Namespace
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ECS schedules & places service endpoints
ECS Scheduler updates on:
• Service scaling
• Task registrations
• Task de-registrations
• Task health
• Scheduling / Placement changes
• ECS instance changes
ECS maintains latest state of the
dynamic environment in Service
Registry
Cluster: myapp
app
IP
web
IP
app
IP
web
IP
AZ 1 AZ 2
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ECS updates service endpoints in Route 53
Cluster: myapp
AZ 1 AZ 2
app
10.0.6.5:8080
web
10.0.8.6:8080
app
10.0.4.5:8080
web
10.0.3.6:8080
Namespace: myapp.local
Service
web.myapp.local CNAME
10.0.4.5:8080
10.0.3.6:8080
Service
app.myapp.local CNAME
10.0.6.5:8080
10.0.8.6:8080
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Services connect to latest endpoints via DNS
Service
web.myapp.local CNAME
10.0.4.5:8080
10.0.3.6:8080
app
>dig web.myapp.local
> 10.0.4.5:8080
>
app web
web
Cluster: myapp DNS Server:
AZ 1 AZ 2
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Benefits of this approach
Cluster: myapp
AZ 1 AZ 2
Service
Namespace
Managed
Just turn on
Highly available
Tied to Route 53
availability, scale
Extensible
Public APIs that can be
used across AWS
Works across clusters,
accounts, AZs
Works across AWS services
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DEMO
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Enables these use cases
1
Blue green deployments
• myapp.staging.local
• myapp.prod.local
• Private IP
• abstract cluster
details
2
Internal micro services
• web.myapp.local
• Expose Private IP
3
External micro services
• web.myapp.mycompa
ny.com
• Expose public IP or
ELB EIP
• network + container
health check
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Enables these use cases
4
Across ECS & EKS
• Service1.myapp.ecs
• Service2.myapp.eks
5
Across ECS &
AWS & onPrem
• Service1.myapp.ecs
• Service2.myapp.ec2
• Service3.myapp.onprem
6
Expose to service mesh
• Service1.myapp.local
• Service2.myapp.local
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Under the hood
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ECS
Cluster
VPC
Services can discover other services using DNS
Service Green -> Service Blue
(option 1)
• Green does a DNS query
• Query hits internal vpc
DNS server
• Green get a list of IP / IP+Port
• Green communicates with
that IP/ IP + Port
(option 2)
• Green calls Service endpoint
via an API
• Gets list of all IP/ IP+port for
a service
Public DNS:
Public DNS:Private DNS:
blue.colors.local: IP1, IP4, IP5
green.colors.local: IP2, IP3
ECS Control Plane
Cluster: Colors
Service: Blue
Task Defn: Blue
# of tasks: 3
Service: Green
Task Defn: Green
# of tasks: 3
Namespace: colors.local
Service
Blue
Service
Green
Hosted Zone: colors.local Route 53
Control Plane
Service Scheduluer
Docker
ECS
Agent
Task Green
Container
Docker ECS Agent
Task Blue
Container
Task Blue
Container
AZ 1 AZ 2
Docker ECS Agent
Task Blue
Container
Task Blue
Container
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ECS
Cluster
VPC
Services can discover other services using DNS
Public DNS:
Public DNS:Private DNS:
blue.colors.local: IP1
green.colors.local: IP2, IP3, IP4
Cluster: Colors
Service: Blue
Task Defn: Blue
# of tasks: 1
Service: Green
Task Defn: Green
# of tasks: 3
Namespace: colors.local
Service
Blue
Service
Green
Hosted Zone: colors.local Route 53
Control Plane
IP 3
Docker
ECS
Agent
Task Green
Container
Docker ECS Agent
Task Blue
Container
IP 1
Task Blue
Container
IP 2
AZ 1 AZ 2
Docker ECS Agent
Task Blue
Container
IP 4
ECS Control Plane
Service Scheduler
Route 53 Internal
1. Distribute ECS Task endpoints to
DNS servers
ECS -> Route 53
1. Register it with R53 Service
ECS Internal
1. Start Task
2. Get Task ENI (awsvpc mode)
ECS -> Route 53
1. Create Namespace (one per cluster)
2. Create R53 Service (one per
ECS Service)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ECS
Cluster
VPC
Services can discover other services using DNS
ECS –> R53 ongoing
1. Register/ Deregister Tasks
into Route 53 Service based
on task state and health
2. Updates Tasks in Route 53
Service on cluster auto
scaling or service scaling
Route 53 Ongoing
1. For Service query, return
IP/Port
2. For Task Health Check
details, update DNS servers
3. For ECS Task state changes,
update DNS servers
Public DNS:
Public DNS:Private DNS:
blue.colors.local: IP1, IP5
green.colors.local: IP2, IP3, IP4
Cluster: Colors
Service: Blue
Task Defn: Blue
# of tasks: 2
Service: Green
Task Defn: Green
# of tasks: 3
Namespace: colors.local
Service
Blue
Service
Green
Hosted Zone: colors.local Route 53
Control Plane
IP 3
Docker
ECS
Agent
Task Green
Container
Docker ECS Agent
Task Blue
Container
IP 1
Task Blue
Container
IP 2
AZ 1 AZ 2
Docker ECS Agent
Task Blue
Container
IP 5
Task Blue
Container
IP 4
ECS Control Plane
Service Scheduluer
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ECS
Cluster
VPC
Services can discover other services using DNS
Service Green -> Service Blue
(option 1)
• Green does a DNS query
• Query hits internal vpc
DNS server
• Green get a list of IP / IP+Port
• Green communicates with
that IP/ IP + Port
(option 2)
• Green calls Service endpoint
via an API
• Gets list of all IP/ IP+port for
a service
Public DNS:
Public DNS:Private DNS:
blue.colors.local: IP1, IP5
green.colors.local: IP2, IP3, IP4
Cluster: Colors
Service: Blue
Task Defn: Blue
# of tasks: 3
Service: Green
Task Defn: Green
# of tasks: 2
Namespace: colors.local
Service
Blue
Service
Green
Hosted Zone: colors.local Route 53
Control Plane
IP 3
Docker
ECS
Agent
Task Green
Container
Docker ECS Agent
Task Blue
Container
IP 1
Task Blue
Container
IP 2
AZ 1 AZ 2
Docker ECS Agent
Task Blue
Container
IP 5
Task Blue
Container
IP 4
Health Check Health Check
Health Check
ECS Control Plane
Service Scheduluer
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Requirements
• Requires Task Networking—network
mode “awsvpc”
• Requires specifying container health
check endpoint for essential containers
in task
• Console workflow has assumes 1:1:1
mapping of vpc-cluster-app
• Dependent on Route 53 propagation
delay for registering new IPs (scaling)
or stopping traffic to unhealthy tasks
• Client side logic needed for query,
resolution and retries, 8 DNS records
fetched in each query
• Private VPC: container health check
only, no way to add on network health
Launching in Q1 2018
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Route 53 Auto Naming
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is Route 53 Auto Naming?
API that powers ECS
Service Discovery
Service name registration and
management tool
DNS-based service discovery
mechanism
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Namespace Service Service Instance
Introducing new abstractions
Instance
172.10.0.1
frontend
ServiceNamespace
test.internal
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Logical group of services
Private or public visibility
Service-linked hosted zone in
Amazon Route 53
Namespace management APIs:
createPublicDnsNamespace
createPrivateDnsNamespace
deleteNamespace
listNamespaces
getNamespace
Service
Namespace
staging.internal
frontend
Namespace
backend
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ECS: application component run on
one or many tasks
Auto Naming: service naming and
health checking template
Service management APIs:
createService
deleteService
updateService
listServices
getService
Service
staging.internal
frontend
Name = frontend
Record type = A
TTL = 60 sec
Check health = Yes
HC type = path-based
HC path = /ping
Service
Namespace
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Service Instance
staging.internal
frontend
Name = frontend
Record type = A
TTL = 60 sec
Check health = Yes
HC type = path-based
HC path = /ping
Instance
172.10.0.1
Service
Instance
172.10.0.2
Instance
172.10.0.3
Represents an actual endpoint
Addressable by ip or ip:port
Service Instance
management APIs:
registerInstance
deregisterInstance
listInstances
getInstance
getInstanceHealthStatus
Namespace
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Route 53 Auto Naming Route 53 Route 53 Health Check EndpointECS
Route 53 Auto Naming Route 53 Route 53 Health Check EndpointECS
loop
createPrivateDNSNamespace
operationID
createService(DNS,HealthCheck)
store DNS and health check temaplate
service details
loop
loop
[Multiple Instance Registration]
registerInstance(service, IP)
add operation to batch
operationID
create health check
HealthCheckID
Create DNS records
[Health Checking]
create health status
[Auto Naming Batch Processing]
Route 53 Auto Naming workflow
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Discovery over DNS
* If health-checking is enabled for the corresponding Route 53 Auto Naming Service
Auto Naming uses Route 53
Multivalue Answer Routing
Each DNS query returns up to 8
healthy* endpoints
Client-side load balancing
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Route 53 Auto Naming benefits
Managed API designed for
micro-service architectures
Regional control plane for
better availability
Discovery via Route 53 DNS
with 100% availability SLA
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
THANK YOU!
C L I C K T O A D D T E X T

Mais conteúdo relacionado

Mais procurados

Getting Started with Consul
Getting Started with ConsulGetting Started with Consul
Getting Started with ConsulRamit Surana
 
Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)Brian Brazil
 
Using cgroups in docker container
Using cgroups in docker containerUsing cgroups in docker container
Using cgroups in docker containerVinay Jindal
 
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기SeungYong Oh
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy Docker, Inc.
 
Juraci Paixão Kröhling - All you need to know about OpenTelemetry
Juraci Paixão Kröhling - All you need to know about OpenTelemetryJuraci Paixão Kröhling - All you need to know about OpenTelemetry
Juraci Paixão Kröhling - All you need to know about OpenTelemetryJuliano Costa
 
Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...
Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...
Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...slashn
 
IBM JVM 소개 - Oracle JVM 과 비교
IBM JVM 소개 - Oracle JVM 과 비교IBM JVM 소개 - Oracle JVM 과 비교
IBM JVM 소개 - Oracle JVM 과 비교JungWoon Lee
 
Ndc17 DevOps? DevOps개발자? 북미에서의 6년
Ndc17 DevOps? DevOps개발자? 북미에서의 6년Ndc17 DevOps? DevOps개발자? 북미에서의 6년
Ndc17 DevOps? DevOps개발자? 북미에서의 6년Taehyun Kim
 
[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance TuningJi-Woong Choi
 
Microservice - Up to 500k CCU
Microservice - Up to 500k CCUMicroservice - Up to 500k CCU
Microservice - Up to 500k CCUViet Tran
 
Formation Usine Logicielle gratuite par Ippon 2014
Formation Usine Logicielle gratuite par Ippon 2014Formation Usine Logicielle gratuite par Ippon 2014
Formation Usine Logicielle gratuite par Ippon 2014Ippon
 
Full-Stack Development with Spring Boot and VueJS
Full-Stack Development with Spring Boot and VueJSFull-Stack Development with Spring Boot and VueJS
Full-Stack Development with Spring Boot and VueJSVMware Tanzu
 
청강대 특강 - 프로젝트 제대로 해보기
청강대 특강 - 프로젝트 제대로 해보기청강대 특강 - 프로젝트 제대로 해보기
청강대 특강 - 프로젝트 제대로 해보기Chris Ohk
 
쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기Brian Hong
 
Understanding docker networking
Understanding docker networkingUnderstanding docker networking
Understanding docker networkingLorenzo Fontana
 
Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...
Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...
Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...data://disrupted®
 
Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...
Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...
Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...confluent
 
파이썬 생존 안내서 (자막)
파이썬 생존 안내서 (자막)파이썬 생존 안내서 (자막)
파이썬 생존 안내서 (자막)Heungsub Lee
 

Mais procurados (20)

Getting Started with Consul
Getting Started with ConsulGetting Started with Consul
Getting Started with Consul
 
Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)
 
Using cgroups in docker container
Using cgroups in docker containerUsing cgroups in docker container
Using cgroups in docker container
 
Prometheus monitoring
Prometheus monitoringPrometheus monitoring
Prometheus monitoring
 
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy
 
Juraci Paixão Kröhling - All you need to know about OpenTelemetry
Juraci Paixão Kröhling - All you need to know about OpenTelemetryJuraci Paixão Kröhling - All you need to know about OpenTelemetry
Juraci Paixão Kröhling - All you need to know about OpenTelemetry
 
Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...
Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...
Slash n: Tech Talk Track 2 – Website Architecture-Mistakes & Learnings - Sidd...
 
IBM JVM 소개 - Oracle JVM 과 비교
IBM JVM 소개 - Oracle JVM 과 비교IBM JVM 소개 - Oracle JVM 과 비교
IBM JVM 소개 - Oracle JVM 과 비교
 
Ndc17 DevOps? DevOps개발자? 북미에서의 6년
Ndc17 DevOps? DevOps개발자? 북미에서의 6년Ndc17 DevOps? DevOps개발자? 북미에서의 6년
Ndc17 DevOps? DevOps개발자? 북미에서의 6년
 
[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning
 
Microservice - Up to 500k CCU
Microservice - Up to 500k CCUMicroservice - Up to 500k CCU
Microservice - Up to 500k CCU
 
Formation Usine Logicielle gratuite par Ippon 2014
Formation Usine Logicielle gratuite par Ippon 2014Formation Usine Logicielle gratuite par Ippon 2014
Formation Usine Logicielle gratuite par Ippon 2014
 
Full-Stack Development with Spring Boot and VueJS
Full-Stack Development with Spring Boot and VueJSFull-Stack Development with Spring Boot and VueJS
Full-Stack Development with Spring Boot and VueJS
 
청강대 특강 - 프로젝트 제대로 해보기
청강대 특강 - 프로젝트 제대로 해보기청강대 특강 - 프로젝트 제대로 해보기
청강대 특강 - 프로젝트 제대로 해보기
 
쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기
 
Understanding docker networking
Understanding docker networkingUnderstanding docker networking
Understanding docker networking
 
Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...
Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...
Nextcloud als On-Premises Lösung für hochsicheren Datenaustausch (Frank Karli...
 
Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...
Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...
Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...
 
파이썬 생존 안내서 (자막)
파이썬 생존 안내서 (자막)파이썬 생존 안내서 (자막)
파이썬 생존 안내서 (자막)
 

Semelhante a Introducing Service Discovery for Amazon ECS - CON403 - re:Invent 2017

New Features for Building Powerful Containerized Microservices on AWS - AWS O...
New Features for Building Powerful Containerized Microservices on AWS - AWS O...New Features for Building Powerful Containerized Microservices on AWS - AWS O...
New Features for Building Powerful Containerized Microservices on AWS - AWS O...Amazon Web Services
 
New Features for Building Powerful Containerized Microservices on AWS - AWS O...
New Features for Building Powerful Containerized Microservices on AWS - AWS O...New Features for Building Powerful Containerized Microservices on AWS - AWS O...
New Features for Building Powerful Containerized Microservices on AWS - AWS O...Amazon Web Services
 
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017Amazon Web Services
 
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017Roven Drabo
 
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech TalksAWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech TalksAmazon Web Services
 
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...Amazon Web Services
 
Learn how to build serverless applications using the AWS Serverless Platform-...
Learn how to build serverless applications using the AWS Serverless Platform-...Learn how to build serverless applications using the AWS Serverless Platform-...
Learn how to build serverless applications using the AWS Serverless Platform-...Amazon Web Services
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersAmazon Web Services
 
Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Amazon Web Services
 
Navigating Microservice Architecture with AWS - AWS Public Sector Summit Sing...
Navigating Microservice Architecture with AWS - AWS Public Sector Summit Sing...Navigating Microservice Architecture with AWS - AWS Public Sector Summit Sing...
Navigating Microservice Architecture with AWS - AWS Public Sector Summit Sing...Amazon Web Services
 
ARC319_Multi-Region Active-Active Architecture
ARC319_Multi-Region Active-Active ArchitectureARC319_Multi-Region Active-Active Architecture
ARC319_Multi-Region Active-Active ArchitectureAmazon Web Services
 
DEV333_Using Amazon CloudWatch for Amazon ECS Resource Monitoring at Scale
DEV333_Using Amazon CloudWatch for Amazon ECS Resource Monitoring at ScaleDEV333_Using Amazon CloudWatch for Amazon ECS Resource Monitoring at Scale
DEV333_Using Amazon CloudWatch for Amazon ECS Resource Monitoring at ScaleAmazon Web Services
 
How to Design a Multi-Region Active-Active Architecture
How to Design a Multi-Region Active-Active ArchitectureHow to Design a Multi-Region Active-Active Architecture
How to Design a Multi-Region Active-Active ArchitectureAmazon Web Services
 
AWS Summit Singapore Webinar Edition | More Containers, Less Operations & Mig...
AWS Summit Singapore Webinar Edition | More Containers, Less Operations & Mig...AWS Summit Singapore Webinar Edition | More Containers, Less Operations & Mig...
AWS Summit Singapore Webinar Edition | More Containers, Less Operations & Mig...Amazon Web Services
 
GPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to MoveGPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to MoveAmazon Web Services
 
Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...
Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...
Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...Amazon Web Services
 
Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017
Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017
Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017Amazon Web Services
 
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdfDEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdfAmazon Web Services
 

Semelhante a Introducing Service Discovery for Amazon ECS - CON403 - re:Invent 2017 (20)

New Features for Building Powerful Containerized Microservices on AWS - AWS O...
New Features for Building Powerful Containerized Microservices on AWS - AWS O...New Features for Building Powerful Containerized Microservices on AWS - AWS O...
New Features for Building Powerful Containerized Microservices on AWS - AWS O...
 
New Features for Building Powerful Containerized Microservices on AWS - AWS O...
New Features for Building Powerful Containerized Microservices on AWS - AWS O...New Features for Building Powerful Containerized Microservices on AWS - AWS O...
New Features for Building Powerful Containerized Microservices on AWS - AWS O...
 
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
 
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
 
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech TalksAWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
 
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
 
Learn how to build serverless applications using the AWS Serverless Platform-...
Learn how to build serverless applications using the AWS Serverless Platform-...Learn how to build serverless applications using the AWS Serverless Platform-...
Learn how to build serverless applications using the AWS Serverless Platform-...
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with Containers
 
Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017
 
Navigating Microservice Architecture with AWS - AWS Public Sector Summit Sing...
Navigating Microservice Architecture with AWS - AWS Public Sector Summit Sing...Navigating Microservice Architecture with AWS - AWS Public Sector Summit Sing...
Navigating Microservice Architecture with AWS - AWS Public Sector Summit Sing...
 
AWS 容器服務入門實務
AWS 容器服務入門實務AWS 容器服務入門實務
AWS 容器服務入門實務
 
ARC319_Multi-Region Active-Active Architecture
ARC319_Multi-Region Active-Active ArchitectureARC319_Multi-Region Active-Active Architecture
ARC319_Multi-Region Active-Active Architecture
 
DEV333_Using Amazon CloudWatch for Amazon ECS Resource Monitoring at Scale
DEV333_Using Amazon CloudWatch for Amazon ECS Resource Monitoring at ScaleDEV333_Using Amazon CloudWatch for Amazon ECS Resource Monitoring at Scale
DEV333_Using Amazon CloudWatch for Amazon ECS Resource Monitoring at Scale
 
How to Design a Multi-Region Active-Active Architecture
How to Design a Multi-Region Active-Active ArchitectureHow to Design a Multi-Region Active-Active Architecture
How to Design a Multi-Region Active-Active Architecture
 
AWS Summit Singapore Webinar Edition | More Containers, Less Operations & Mig...
AWS Summit Singapore Webinar Edition | More Containers, Less Operations & Mig...AWS Summit Singapore Webinar Edition | More Containers, Less Operations & Mig...
AWS Summit Singapore Webinar Edition | More Containers, Less Operations & Mig...
 
GPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to MoveGPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
 
Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...
Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...
Advanced Patterns in Microservices Implementation with Amazon ECS - CON402 - ...
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
 
Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017
Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017
Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017
 
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdfDEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
 

Mais de Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Mais de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Introducing Service Discovery for Amazon ECS - CON403 - re:Invent 2017

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS Service Discovery S h u b h a R a o , S r . P r o d u c t M a n a g e r , E l a s t i c C o n t a i n e r S e r v i c e A l e x a n d r M o r o z , S r . P r o d u c t M a n a g e r , R o u t e 5 3
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Application communication is evolving Functional calls Find endpoints, then connect Across the room Dynamic name, number, and location Across cities 1:1 Known endpoints, APIs
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Developers need to connect micro services Build apps invoking other services by name Ensure that service name resolves to correct IP/port DEV OPS
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is Service Discovery? “Where is Service X?” Friendly name -> IP + port E.g., app: {10.0.4.5:8080, 10.0.4.6:8080 }
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Why is it non trivial? Dynamic by design: Number of containers & instances Auto assigned IP addresses & ports Placement, scheduling, scaling Deployments and upgrades Health and connectivity
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. C u rre n t p at te r n s r e qu ir e in stall, se t u p an d m an ag e m e n t Load Balancers Key-value store Service Mesh Service registry
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Decision criteria Service registry Discovery mechanism Server side or client side Registration mechanism Third party or application framework
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. E.g., Load Balancer Benefits Client is simpler Drawbacks Install, manage Availability, capacity More hops Load Balancers – Server Side Discovery Client Server Server Server Request Request LB + Service Registry Register Register
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DNS based – Client Side Discovery E.g., Route 53 Based Benefits Fewer hops Drawbacks Client must be registry aware Client implements discovery logic Client Server Server Server Service Registry Request Register Register Register Query
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Requires registrations by agents E.g., Consul, Etcd and Zookeeper Benefits Registrar registers, unregisters and performs health checks Service less complex Drawbacks State may not reflect whether service can handle requests, only active or unavailable Install, configure and manage other component, unless it is a part of infrastructure Server Server Server Service Registry Update Start, stop, health change Registrar/ service manager
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Requires registrations by agents E.g., Consul, Etcd and Zookeeper Benefits Registrar registers, unregisters and performs health checks Service less complex Drawbacks State may not reflect whether service can handle requests, only active or unavailable Install, configure and manage other component, unless it is a part of infrastructure Client Server Server Client Key Value Service Registry Registrator Server Client Key Value Key Value Master Key Value Service Registry Key Value Key Value Master Registrator
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customers want it simpler! Predictable Names for services Auto updated with latest, healthy IP, port Managed: No overhead of installation or monitoring High availability, high scale Extensible: Flexible boundaries for auto discovery
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Introducing managed service discovery for ECS You build apps where services are invoked by name & name resolves to IP/port dynamically You turn on service discovery during deployment — service creation DEV OPS
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS service discovery is powered by Route 53 ECS updates service registry based on naming convention, task registrations, de-registrations and health Route 53 provides Service Registry Route 53ECS
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What’s new?
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Route 53 provides Service Registry Route 53 provides APIs to create • Namespace • CNAME per service autoname • A records per task IP • SRV records per task IP + port More details later in the presentation Service CNAME: A / SRV record Namespace
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS schedules & places service endpoints ECS Scheduler updates on: • Service scaling • Task registrations • Task de-registrations • Task health • Scheduling / Placement changes • ECS instance changes ECS maintains latest state of the dynamic environment in Service Registry Cluster: myapp app IP web IP app IP web IP AZ 1 AZ 2
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS updates service endpoints in Route 53 Cluster: myapp AZ 1 AZ 2 app 10.0.6.5:8080 web 10.0.8.6:8080 app 10.0.4.5:8080 web 10.0.3.6:8080 Namespace: myapp.local Service web.myapp.local CNAME 10.0.4.5:8080 10.0.3.6:8080 Service app.myapp.local CNAME 10.0.6.5:8080 10.0.8.6:8080
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Services connect to latest endpoints via DNS Service web.myapp.local CNAME 10.0.4.5:8080 10.0.3.6:8080 app >dig web.myapp.local > 10.0.4.5:8080 > app web web Cluster: myapp DNS Server: AZ 1 AZ 2
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Benefits of this approach Cluster: myapp AZ 1 AZ 2 Service Namespace Managed Just turn on Highly available Tied to Route 53 availability, scale Extensible Public APIs that can be used across AWS Works across clusters, accounts, AZs Works across AWS services
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DEMO
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Enables these use cases 1 Blue green deployments • myapp.staging.local • myapp.prod.local • Private IP • abstract cluster details 2 Internal micro services • web.myapp.local • Expose Private IP 3 External micro services • web.myapp.mycompa ny.com • Expose public IP or ELB EIP • network + container health check
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Enables these use cases 4 Across ECS & EKS • Service1.myapp.ecs • Service2.myapp.eks 5 Across ECS & AWS & onPrem • Service1.myapp.ecs • Service2.myapp.ec2 • Service3.myapp.onprem 6 Expose to service mesh • Service1.myapp.local • Service2.myapp.local
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Under the hood
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS Cluster VPC Services can discover other services using DNS Service Green -> Service Blue (option 1) • Green does a DNS query • Query hits internal vpc DNS server • Green get a list of IP / IP+Port • Green communicates with that IP/ IP + Port (option 2) • Green calls Service endpoint via an API • Gets list of all IP/ IP+port for a service Public DNS: Public DNS:Private DNS: blue.colors.local: IP1, IP4, IP5 green.colors.local: IP2, IP3 ECS Control Plane Cluster: Colors Service: Blue Task Defn: Blue # of tasks: 3 Service: Green Task Defn: Green # of tasks: 3 Namespace: colors.local Service Blue Service Green Hosted Zone: colors.local Route 53 Control Plane Service Scheduluer Docker ECS Agent Task Green Container Docker ECS Agent Task Blue Container Task Blue Container AZ 1 AZ 2 Docker ECS Agent Task Blue Container Task Blue Container
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS Cluster VPC Services can discover other services using DNS Public DNS: Public DNS:Private DNS: blue.colors.local: IP1 green.colors.local: IP2, IP3, IP4 Cluster: Colors Service: Blue Task Defn: Blue # of tasks: 1 Service: Green Task Defn: Green # of tasks: 3 Namespace: colors.local Service Blue Service Green Hosted Zone: colors.local Route 53 Control Plane IP 3 Docker ECS Agent Task Green Container Docker ECS Agent Task Blue Container IP 1 Task Blue Container IP 2 AZ 1 AZ 2 Docker ECS Agent Task Blue Container IP 4 ECS Control Plane Service Scheduler Route 53 Internal 1. Distribute ECS Task endpoints to DNS servers ECS -> Route 53 1. Register it with R53 Service ECS Internal 1. Start Task 2. Get Task ENI (awsvpc mode) ECS -> Route 53 1. Create Namespace (one per cluster) 2. Create R53 Service (one per ECS Service)
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS Cluster VPC Services can discover other services using DNS ECS –> R53 ongoing 1. Register/ Deregister Tasks into Route 53 Service based on task state and health 2. Updates Tasks in Route 53 Service on cluster auto scaling or service scaling Route 53 Ongoing 1. For Service query, return IP/Port 2. For Task Health Check details, update DNS servers 3. For ECS Task state changes, update DNS servers Public DNS: Public DNS:Private DNS: blue.colors.local: IP1, IP5 green.colors.local: IP2, IP3, IP4 Cluster: Colors Service: Blue Task Defn: Blue # of tasks: 2 Service: Green Task Defn: Green # of tasks: 3 Namespace: colors.local Service Blue Service Green Hosted Zone: colors.local Route 53 Control Plane IP 3 Docker ECS Agent Task Green Container Docker ECS Agent Task Blue Container IP 1 Task Blue Container IP 2 AZ 1 AZ 2 Docker ECS Agent Task Blue Container IP 5 Task Blue Container IP 4 ECS Control Plane Service Scheduluer
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS Cluster VPC Services can discover other services using DNS Service Green -> Service Blue (option 1) • Green does a DNS query • Query hits internal vpc DNS server • Green get a list of IP / IP+Port • Green communicates with that IP/ IP + Port (option 2) • Green calls Service endpoint via an API • Gets list of all IP/ IP+port for a service Public DNS: Public DNS:Private DNS: blue.colors.local: IP1, IP5 green.colors.local: IP2, IP3, IP4 Cluster: Colors Service: Blue Task Defn: Blue # of tasks: 3 Service: Green Task Defn: Green # of tasks: 2 Namespace: colors.local Service Blue Service Green Hosted Zone: colors.local Route 53 Control Plane IP 3 Docker ECS Agent Task Green Container Docker ECS Agent Task Blue Container IP 1 Task Blue Container IP 2 AZ 1 AZ 2 Docker ECS Agent Task Blue Container IP 5 Task Blue Container IP 4 Health Check Health Check Health Check ECS Control Plane Service Scheduluer
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Requirements • Requires Task Networking—network mode “awsvpc” • Requires specifying container health check endpoint for essential containers in task • Console workflow has assumes 1:1:1 mapping of vpc-cluster-app • Dependent on Route 53 propagation delay for registering new IPs (scaling) or stopping traffic to unhealthy tasks • Client side logic needed for query, resolution and retries, 8 DNS records fetched in each query • Private VPC: container health check only, no way to add on network health Launching in Q1 2018
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Route 53 Auto Naming
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is Route 53 Auto Naming? API that powers ECS Service Discovery Service name registration and management tool DNS-based service discovery mechanism
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Namespace Service Service Instance Introducing new abstractions Instance 172.10.0.1 frontend ServiceNamespace test.internal
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Logical group of services Private or public visibility Service-linked hosted zone in Amazon Route 53 Namespace management APIs: createPublicDnsNamespace createPrivateDnsNamespace deleteNamespace listNamespaces getNamespace Service Namespace staging.internal frontend Namespace backend
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS: application component run on one or many tasks Auto Naming: service naming and health checking template Service management APIs: createService deleteService updateService listServices getService Service staging.internal frontend Name = frontend Record type = A TTL = 60 sec Check health = Yes HC type = path-based HC path = /ping Service Namespace
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Service Instance staging.internal frontend Name = frontend Record type = A TTL = 60 sec Check health = Yes HC type = path-based HC path = /ping Instance 172.10.0.1 Service Instance 172.10.0.2 Instance 172.10.0.3 Represents an actual endpoint Addressable by ip or ip:port Service Instance management APIs: registerInstance deregisterInstance listInstances getInstance getInstanceHealthStatus Namespace
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Route 53 Auto Naming Route 53 Route 53 Health Check EndpointECS Route 53 Auto Naming Route 53 Route 53 Health Check EndpointECS loop createPrivateDNSNamespace operationID createService(DNS,HealthCheck) store DNS and health check temaplate service details loop loop [Multiple Instance Registration] registerInstance(service, IP) add operation to batch operationID create health check HealthCheckID Create DNS records [Health Checking] create health status [Auto Naming Batch Processing] Route 53 Auto Naming workflow
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Discovery over DNS * If health-checking is enabled for the corresponding Route 53 Auto Naming Service Auto Naming uses Route 53 Multivalue Answer Routing Each DNS query returns up to 8 healthy* endpoints Client-side load balancing
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Route 53 Auto Naming benefits Managed API designed for micro-service architectures Regional control plane for better availability Discovery via Route 53 DNS with 100% availability SLA
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. THANK YOU! C L I C K T O A D D T E X T