Learning Objectives:
• Understand key microservices concepts and common patterns
• Learn how to deploy microservices on Amazon ECS
What are monoliths, what are microservices, how do containers fit into the picture, and how do I do this all in production?
In this session, we will explore the reasoning and concepts behind microservices and how you can transform monolithic apps into microservices. We will discuss how containers simplify building microservices-based applications, and we will walk through a number of patterns used by our customers to run their microservices platforms. We will also dive deep into some of the challenges of running microservices, such as load balancing, service discovery, and secrets management, and we’ll see how Amazon EC2 Container Service (ECS) can help address them. We’ll also demo how you can easily deploy complex microservices applications using Amazon ECS.
4. What are microservices?
“A software architecture style in which complex
applications are composed of small, independent
processes communicating with each other using
language-agnostic APIs. These services are small, highly
decoupled and focus on doing a small task, facilitating a
modular approach to system-building.” - Wikipedia
https://en.wikipedia.org/wiki/Microservices
6. Characteristics of Microservice Architectures
Do one
thing wellIndependent
Decentralized
Black box
Polyglot
You build it, you run it
7. Why Amazon ECS
• Fully managed elastic service – You don’t
need to run anything, and the service
scales as your microservices architecture
grows
• Shared state optimistic scheduling
• Integration with CloudWatch service for
monitoring and logging
• Integration with Code* services for
continuous integration and delivery (CI/CD)
8. Deploying Containers on ECS – Choose a Scheduler
Batch Jobs
ECS task scheduler
Run tasks once
Batch jobs
RunTask (random)
StartTask (placed)
Long-Running Apps
ECS service scheduler
Health management
Scale-up and scale-down
AZ aware
Grouped containers
23. Example Microservice Architecture on ECS
Amazon
ECR
Amazon
RDS
Application Load
Balancer
ECS Cluster
ECS Cluster
IAM
Amazon API
Gateway*
Amazon
Route 53
Amazon CloudWatch
24. Automatic Service Scaling
Publish metrics
Auto Scaling ECS service
Availability
Zone A
Availability
Zone B
TASK A
Add/Remove ECS
tasks
TASK C
TASK BScaling Policies
Amazon
CloudWatch
Amazon ECS
Application
Load Balancer
25. IAM Roles For Tasks
ECS Cluster
EC2 Instance EC2 Instance
TASK A
TASK B
TASK B
Amazon
DynamoDB
Amazon
S3