More Related Content Similar to Using Containers and Serverless to Deploy Microservices (ARC214) - AWS re:Invent 2018 (20) More from Amazon Web Services (20) Using Containers and Serverless to Deploy Microservices (ARC214) - AWS re:Invent 20182. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Using Containers and Serverless to
Deploy Microservices
Josh Kahn
Solutions Architect
AWS
A R C 2 1 4
Mayank Thakkar
Global Life Sciences Solutions Architect
AWS
3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Our goal
Explore the benefits and trade-offs of container and
serverless architectures
4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Options for architecting your microservices
AWS Lambda
Amazon EKS
Amazon ECS
AWS Fargate
Containers Serverless
6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Containers: ECS, EKS, Fargate
• Platforms to run containerized applications on AWS
• Easily run and scale applications to meet your needs
• Native integration with other AWS services
• Pairs well with CI/CD
• Benefits
• Portability
• Control
• Rich ecosystem
7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS container web architecture
VPC
Availability Zone A Availability Zone B
Public Subnet
Private Subnet
Public Subnet
Private Subnet
NAT Gateway NAT Gateway
ECS Cluster
Auto Scaling Group
Instances Instances
Internet
Gateway
8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless: Lambda
• Platform to run code without thinking about servers
• Our definition
• No servers to provision or manage
• Scales with usage
• Never pay for idle
• High availability built in, fault tolerance made easier
• Native integration with other AWS services
• Benefits
• Event-driven framework
• Multiple invocation models
• Opinionated
9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS serverless web architecture
AWS Cloud
10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Architectural considerations
• Custom code & services: Build
your own environment
• Numerous choices
• Requires management and
orchestration*
• Standardized choices
• Opinionated approach drives
scalable platform
• Security and scaling
managed by AWS
• Serverless and
“containerless”
Containers Serverless
* - Fargate changes this model
11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Other considerations
• Wide array of power options
• Power level managed by container,
scoped by host
• Fargate offers streamlined model
• Multiple networking modes
• Mature tooling
• Easy power level selection
• 128MB to 3GB
• Network and CPU assigned
proportionally
• Can overwhelm backends
• Developing tooling
• Organizational readiness?
Containers Serverless
* - Fargate changes this model
12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Ideas on selecting … containers
When you need …
• Lower startup latency
• Support for long running compute jobs (> 15 minutes)
• Predictable, high traffic usage
• Persistence of data
When you want …
• Complete control of compute environment
• But not just for the sake of control
14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Ideas on selecting … serverless
When you need …
• To trigger action on an event
• Support for varying utilization
• Ability to handle unknown demand
When you want to …
• Quickly prove business value
• Hand operational complexity (for example, patching, scaling) to AWS
• Make fewer decisions
15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What if I can’t decide?
16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Runtime environment
compatible with AWS
Lambda?
.NET Core, Go, Java, Python,
or Node.js
Unknown
demand and
below RPS
breakeven
Inter-container
communication*
or storage-
intensive?
Desire orchestration
portability OR open
source fan?
Amazon EKS
Are you comfortable
managing your own
infrastructure?
Amazon ECSAWS Fargate
Deployment
Package size
<= 50MB
Desired Service
runtime <= 15
minutes?
AWS Lambda
Decision Tree – well, almost!
17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon API Gateway
Enables best practices for distributed systems
• Throttling
• Retry with exponential fallback
• Fail fast
Support for public and private services
19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS AppSync
Enables data-driven, real-time apps
• Multiple data sources, one endpoint
• Client specifies payload
• Subscription to latest data
20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS X-Ray
Delivers insight into distributed applications
• Uncover application issues
• Improve application performance
• Ready for ECS, Lambda, and more
21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
To learn more …
Containers
https://aws.amazon.com/containers/
Serverless
https://aws.amazon.com/serverless/
22. Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Josh Kahn
jkahn@amazon.com
Mayank Thakkar
mbt@amazon.com
23. Time: 15 minutes after this session
Location: Speaker Lounge (ARIA East, Level 1, Willow Lounge)
Duration: 30 min.
24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.