SlideShare a Scribd company logo
S U M M I T
Taipei
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
利用 Fargate - 無伺服器的容器環
境建置高延展性的系統
Jayson Hsieh
Solutions Architect
AWS/Solutions Architecture
S e s s i o n I D
Alan Hsieh
R&D Manager
Growth Machine/R&D
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS Container Services landscape
MANAGEMENT
Deployment, scheduling, scaling &
management of containerized
applications
HOSTING
Where the containers run
IMAGE REGISTRY
Container image repository
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Your containerized
applications
Managed by AWS
No EC2 Instances to provision, scale or manage
Elastic
Scale up & down seamlessly. Pay only for what you use
Integrated
with the AWS ecosystem: VPC Networking, Elastic Load
Balancing, IAM Permissions, CloudWatch and more
AWS Fargate
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Fully managed container environment with AWS Fargate
Bring existing code Production ready Powerful integrations
No changes required of existing
code, works with existing workflows
and microservices built
on Amazon ECS
ISO, PCI, HIPAA, SOC compliant.
Launch ten or tens of thousands
of containers in seconds
with 99.99% SLA
Native AWS integrations for
networking, security, CICD,
monitoring, and tracing
Fargate runs tens of millions of containers for AWS customers every week
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS Fargate
Scheduling and Orchestration
Cluster Manager Placement Engine
Availability zone 1 Availability zone 2 Availability zone 3
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Amazon ECS Constructs
Cluster
• Resource grouping and isolation
• IAM permissions boundary
Service
• Maintains desired # of
running tasks
• Replaces unhealthy tasks
• Elastic Load Balancing
integration
Task
• Running instance of a task
definition
• One or more containers
Task Definition
• Template used by Amazon ECS
to launch tasks
• Parallels to docker run
parameters
• Defines requirements – e.g.
• CPU/Memory
• Container image(s)
• Logging
• AWS Identity and Access
Management (IAM) role
Container 1
Container 1
Container 1
Container 1Container 1
{ ; }
JSON
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Fargate Task CPU and Memory configurations
50 different CPU/Memory configurations to choose from
CPU Memory
256 (.25 vCPU) 512MB, 1GB, 2GB
512 (.5 vCPU) 1GB, 2GB, 3GB, 4GB
1024 (1 vCPU) 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
2048 (2 vCPU) Between 4GB and 16GB in 1GB increments
4096 (4 vCPU) Between 8GB and 30GB in 1GB increments
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Networking - Launching a Fargate task into a
VPC 172.31.0.0/16
Subnet
172.31.1.0/24
Internet
Other Entities in VPC
EC2 LB DB etc.
Launch your Fargate Tasks into subnets
Under the hood :
• We create an Elastic Network Interface (ENI)
• The ENI is allocated a private IP from your subnet
• The ENI is attached to your task
• Your task now has a private IP from your subnet!
You can assign public IPs to your tasks
Configure security groups to control inbound & outbound traffic
ENI Fargate
Task
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Observability
“…a measure of how well internal states of a system can be inferred from
knowledge of its external outputs.” – Wikipedia
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Monitoring
Amazon CloudWatch ECS metrics
Service CPU/memory utilization
Amazon ECS metadata endpoint
Query task metadata and access Docker
stats for running tasks
169.254.170.2/v2/metadata
169.254.170.2/v2/stats
Partners
"read": "2018-11-17T01:39:05.558680889Z",
"preread": "2018-11-17T01:39:04.569462567Z",
"num_procs": 0,
"pids_stats": {},
"network": {},
"memory_stats": {
"stats": {
"cache": 6127616,
"mapped_file": 2117632,
"total_inactive_file": 1626112,
"pgpgout": 3056,
"rss": 3981312,
"total_mapped_file": 2117632,
"pgpgin": 5524,
"pgmajfault": 51,
"total_rss": 3981312,
"hierarchical_memory_limit": 536870912,
"total_pgfault": 5865,
"total_active_file": 4501504,
"active_anon": 3981312,
"total_active_anon": 3981312,
"total_pgpgout": 3056,
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Logging
Amazon CloudWatch Logs
Fargate awslogs log driver
STDOUT and STDERR I/O streams
Stream logs to Amazon Kinesis Data
Streams, Amazon Kinesis Data Firehose,
AWS Lambda
Subscription filters
Container 1
logs logs
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Logging
Sidecar container
Fargate provides 4GB ephemeral storage
Amazon Kinesis agent sidecar pattern (below)
Custom logging solutions
logs
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Distributed Tracing
User
AWS X-Ray
Analyze and debug distributed applications
Useful for microservices environments
X-Ray SDK for app instrumentation
X-Ray daemon runs as sidecar
Service
from aws_xray_sdk.core import xray_recorder
from aws_xray_sdk.ext.flask.middleware import XRayMiddleware
app = Flask(__name__)
xray_recorder.configure(service=‘Microservice’)
XRayMiddleware(app, xray_recorder)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Distributed Tracing
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Alerting
Amazon CloudWatch
Collects metrics, events, logs produced by
services/apps
Triggers actions based on metric thresholds and
event/log patterns
Service Integration
Amazon SNS
User notifications – email, SMS, mobile app
System-to-system messaging – AWS Lambda,
SQS, HTTP/S endpoint
AWS Lambda
Event-driven compute
Rule Alarm
Traditional
server
metrics
events
logs
AWS Partner /
Other Consumer
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
CI/CD for Fargate
Amazon EC2
Container Registry
AWS CodeCommit
AWS Fargate
AWS CodeBuild
AWS CodePipeline
Github Jenkins
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Exchange User Behavior
• Need very timely price and quantity
• Lot of actions trigger by event
• Long time and multi-page to watch the price
• Massive of limit orders
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Exchange User Behavior
• Need very timely price and quantity
→ Update 5 times per sec
• Lot of actions trigger by event
→ Massive of instant traffic
• Long time and multi-page to watch the price
→ Multiple growth traffics
• Massive of limit orders
→ High concurrent transactions
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
System Requirement
Handle high concurrency and scale fast, massive
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Agenda
• Service Architecture
• Why Fargate
• How to work and scale
• Maintain and monitor service
• Other services
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Architecture - Service Layer
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Architecture - Service Layer
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Solution Comparison
ECS EKS FARGATE
Management Server + Cluster Server + Cluster Serverless
Support Windows + Linux Windows + Linux Linux
Integration AWS DevOps tools
Cross-platform
K8S sync
AWS DevOps tools
Auto Scaling Container + Server Container + Server Container
Pricing Server Server + Cluster CPU / Memory unit
Others Support spot instance Community resources Higher security
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Why Fargate
We need a stable and massive auto scaling
service without maintaining server
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Work With Fargate
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Scalable Components
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
How To Scale
• Set policies according to best Response Time for each service
• Set Min, Desired, Max number of tasks
• Set target tracking by CPU Utilization, Memory Utilization, Request Count
• Set step tracking by Unhealthy Count
• Set number of tasks in scheduled tasks feature by fixed time
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Renew Task
• Automatically renew tasks at a specific time
• Set [ Force new deployment ] to renew service
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
CloudWatch - Log Insight
• Set log export in ECS Task Definition
• View all logs across tasks
• Filter some keyword in logs
• Visualize log events over time
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Distributed Tracking System
• Trace all the requests for all the services
• Easier to debug and find the issues
• Analysis and tune performance
• Visualize the service relationship and request flow
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
XRAY - Service Map
• Find the node which has problem at first glance
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
XRAY - Traces
• Record segment flow, time cost, annotations, exceptions
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
XRAY - Analytics
• Analysis requests with different periods and figure out the issues
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Hystrix
• Circuit breaker by Netflix
• Protect service with fault tolerance
• Timeout / Breaker / Fallback / Healthy Check
• Use to every external request
• Monitor healthy status of request
• Monitor concurrent loading
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Hystrix Flow
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Hystrix Dashboard
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Deploy - AWS DevOps Tools
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Aurora DB
• Storage auto scaling
• Read replica auto scaling
• Automatically failover
• Support cross-region replica
• Serverless type
• Parallel query type
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Experience
• Understand user behavior and what system we need to provide is very important
• Always plan and use easily scalable solutions
• Periodically analysis service performance to reset autoscaling policies
• Use centralized and analyzed log services in massive of containers and micro services
• Planning ahead log data which we may need will solve problem more quickly
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Thank you!
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Alan Hsieh
alanhsieh@boyu66.net
Jayson Hsieh
hsiej@amazon.com
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I TS U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

What's hot

Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Amazon Web Services
 
Getting Started with Microservices, Containers, and Serverless Architectures
Getting Started with Microservices, Containers, and Serverless ArchitecturesGetting Started with Microservices, Containers, and Serverless Architectures
Getting Started with Microservices, Containers, and Serverless Architectures
Amazon Web Services
 
機器學習技術在工業應用上的最佳實務
機器學習技術在工業應用上的最佳實務機器學習技術在工業應用上的最佳實務
機器學習技術在工業應用上的最佳實務
Amazon Web Services
 
Searching for patterns: Log analytics using Amazon ES - ADB205 - New York AWS...
Searching for patterns: Log analytics using Amazon ES - ADB205 - New York AWS...Searching for patterns: Log analytics using Amazon ES - ADB205 - New York AWS...
Searching for patterns: Log analytics using Amazon ES - ADB205 - New York AWS...
Amazon Web Services
 
Breaking the Monolith using AWS Container Services
Breaking the Monolith using AWS Container ServicesBreaking the Monolith using AWS Container Services
Breaking the Monolith using AWS Container Services
Amazon Web Services
 
Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...
Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...
Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...
Amazon Web Services
 
HK-AWS-Quick-Start-Workshop
HK-AWS-Quick-Start-WorkshopHK-AWS-Quick-Start-Workshop
HK-AWS-Quick-Start-Workshop
Amazon Web Services
 
Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...
Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...
Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...
Amazon Web Services
 
How SAP customers are benefiting from machine learning and IoT with AWS - MAD...
How SAP customers are benefiting from machine learning and IoT with AWS - MAD...How SAP customers are benefiting from machine learning and IoT with AWS - MAD...
How SAP customers are benefiting from machine learning and IoT with AWS - MAD...
Amazon Web Services
 
Everything You Need to Know About Big Data: From Architectural Principles to ...
Everything You Need to Know About Big Data: From Architectural Principles to ...Everything You Need to Know About Big Data: From Architectural Principles to ...
Everything You Need to Know About Big Data: From Architectural Principles to ...
Amazon Web Services
 
Architetture per l'analisi di flussi di dati in tempo reale
Architetture per l'analisi di flussi di dati in tempo realeArchitetture per l'analisi di flussi di dati in tempo reale
Architetture per l'analisi di flussi di dati in tempo reale
Amazon Web Services
 
利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdf利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdf
Amazon Web Services
 
Running Amazon EC2 workloads at scale - CMP301 - New York AWS Summit
Running Amazon EC2 workloads at scale - CMP301 - New York AWS SummitRunning Amazon EC2 workloads at scale - CMP301 - New York AWS Summit
Running Amazon EC2 workloads at scale - CMP301 - New York AWS Summit
Amazon Web Services
 
Tech deep dive: Cloud data management with Veeam and AWS - SVC216-S - New Yor...
Tech deep dive: Cloud data management with Veeam and AWS - SVC216-S - New Yor...Tech deep dive: Cloud data management with Veeam and AWS - SVC216-S - New Yor...
Tech deep dive: Cloud data management with Veeam and AWS - SVC216-S - New Yor...
Amazon Web Services
 
Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...
Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...
Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...
Amazon Web Services
 
No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ...
 No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ... No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ...
No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ...
AWS Summits
 
Progetta, crea e gestisci Modern Application per web e mobile su AWS
Progetta, crea e gestisci Modern Application per web e mobile su AWSProgetta, crea e gestisci Modern Application per web e mobile su AWS
Progetta, crea e gestisci Modern Application per web e mobile su AWS
Amazon Web Services
 
Architecting security and governance across your AWS environment
Architecting security and governance across your AWS environmentArchitecting security and governance across your AWS environment
Architecting security and governance across your AWS environment
Amazon Web Services
 
Building ML platforms in Financial Services with serverless technology - FSV2...
Building ML platforms in Financial Services with serverless technology - FSV2...Building ML platforms in Financial Services with serverless technology - FSV2...
Building ML platforms in Financial Services with serverless technology - FSV2...
Amazon Web Services
 
Building enterprise solutions with blockchain technology - SVC217 - New York ...
Building enterprise solutions with blockchain technology - SVC217 - New York ...Building enterprise solutions with blockchain technology - SVC217 - New York ...
Building enterprise solutions with blockchain technology - SVC217 - New York ...
Amazon Web Services
 

What's hot (20)

Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
 
Getting Started with Microservices, Containers, and Serverless Architectures
Getting Started with Microservices, Containers, and Serverless ArchitecturesGetting Started with Microservices, Containers, and Serverless Architectures
Getting Started with Microservices, Containers, and Serverless Architectures
 
機器學習技術在工業應用上的最佳實務
機器學習技術在工業應用上的最佳實務機器學習技術在工業應用上的最佳實務
機器學習技術在工業應用上的最佳實務
 
Searching for patterns: Log analytics using Amazon ES - ADB205 - New York AWS...
Searching for patterns: Log analytics using Amazon ES - ADB205 - New York AWS...Searching for patterns: Log analytics using Amazon ES - ADB205 - New York AWS...
Searching for patterns: Log analytics using Amazon ES - ADB205 - New York AWS...
 
Breaking the Monolith using AWS Container Services
Breaking the Monolith using AWS Container ServicesBreaking the Monolith using AWS Container Services
Breaking the Monolith using AWS Container Services
 
Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...
Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...
Databases on AWS - The right tool for the right job - ADB203 - Santa Clara AW...
 
HK-AWS-Quick-Start-Workshop
HK-AWS-Quick-Start-WorkshopHK-AWS-Quick-Start-Workshop
HK-AWS-Quick-Start-Workshop
 
Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...
Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...
Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...
 
How SAP customers are benefiting from machine learning and IoT with AWS - MAD...
How SAP customers are benefiting from machine learning and IoT with AWS - MAD...How SAP customers are benefiting from machine learning and IoT with AWS - MAD...
How SAP customers are benefiting from machine learning and IoT with AWS - MAD...
 
Everything You Need to Know About Big Data: From Architectural Principles to ...
Everything You Need to Know About Big Data: From Architectural Principles to ...Everything You Need to Know About Big Data: From Architectural Principles to ...
Everything You Need to Know About Big Data: From Architectural Principles to ...
 
Architetture per l'analisi di flussi di dati in tempo reale
Architetture per l'analisi di flussi di dati in tempo realeArchitetture per l'analisi di flussi di dati in tempo reale
Architetture per l'analisi di flussi di dati in tempo reale
 
利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdf利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdf
 
Running Amazon EC2 workloads at scale - CMP301 - New York AWS Summit
Running Amazon EC2 workloads at scale - CMP301 - New York AWS SummitRunning Amazon EC2 workloads at scale - CMP301 - New York AWS Summit
Running Amazon EC2 workloads at scale - CMP301 - New York AWS Summit
 
Tech deep dive: Cloud data management with Veeam and AWS - SVC216-S - New Yor...
Tech deep dive: Cloud data management with Veeam and AWS - SVC216-S - New Yor...Tech deep dive: Cloud data management with Veeam and AWS - SVC216-S - New Yor...
Tech deep dive: Cloud data management with Veeam and AWS - SVC216-S - New Yor...
 
Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...
Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...
Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...
 
No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ...
 No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ... No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ...
No Hassle NoSQL - Amazon DynamoDB & Amazon DocumentDB | AWS Summit Tel Aviv ...
 
Progetta, crea e gestisci Modern Application per web e mobile su AWS
Progetta, crea e gestisci Modern Application per web e mobile su AWSProgetta, crea e gestisci Modern Application per web e mobile su AWS
Progetta, crea e gestisci Modern Application per web e mobile su AWS
 
Architecting security and governance across your AWS environment
Architecting security and governance across your AWS environmentArchitecting security and governance across your AWS environment
Architecting security and governance across your AWS environment
 
Building ML platforms in Financial Services with serverless technology - FSV2...
Building ML platforms in Financial Services with serverless technology - FSV2...Building ML platforms in Financial Services with serverless technology - FSV2...
Building ML platforms in Financial Services with serverless technology - FSV2...
 
Building enterprise solutions with blockchain technology - SVC217 - New York ...
Building enterprise solutions with blockchain technology - SVC217 - New York ...Building enterprise solutions with blockchain technology - SVC217 - New York ...
Building enterprise solutions with blockchain technology - SVC217 - New York ...
 

Similar to 利用 Fargate - 無伺服器的容器環境建置高可用的系統

利用Fargate無伺服器的容器環境建置高可用的系統
利用Fargate無伺服器的容器環境建置高可用的系統利用Fargate無伺服器的容器環境建置高可用的系統
利用Fargate無伺服器的容器環境建置高可用的系統Amazon Web Services
 
Modern-Application-Design-with-Amazon-ECS
Modern-Application-Design-with-Amazon-ECSModern-Application-Design-with-Amazon-ECS
Modern-Application-Design-with-Amazon-ECS
Amazon Web Services
 
AWS ECS Workshop A Journey to Modern Applications
AWS ECS Workshop A Journey to Modern ApplicationsAWS ECS Workshop A Journey to Modern Applications
AWS ECS Workshop A Journey to Modern Applications
Amazon Web Services
 
Control your cloud environment with AWS management tools
Control your cloud environment with AWS management toolsControl your cloud environment with AWS management tools
Control your cloud environment with AWS management tools
Amazon Web Services
 
Breaking Up the Monolith with Containers
Breaking Up the Monolith with ContainersBreaking Up the Monolith with Containers
Breaking Up the Monolith with ContainersAmazon Web Services
 
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS SummitGetting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Amazon Web Services
 
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
Amazon Web Services
 
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
AWS Summits
 
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Amazon Web Services
 
AWS Outposts Update
AWS Outposts UpdateAWS Outposts Update
AWS Outposts Update
AWS Daily News
 
AWS Containers Day.pdf
AWS Containers Day.pdfAWS Containers Day.pdf
AWS Containers Day.pdf
Amazon Web Services
 
AWSome Day Brasil - Março 2020
AWSome Day Brasil - Março 2020AWSome Day Brasil - Março 2020
AWSome Day Brasil - Março 2020
Amazon Web Services LATAM
 
AWSome Day Brasil - Junho 2020
AWSome Day Brasil - Junho 2020AWSome Day Brasil - Junho 2020
AWSome Day Brasil - Junho 2020
Amazon Web Services LATAM
 
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Amazon Web Services
 
Java Developer on AWS 在AWS上開發Java應用
Java Developer on AWS 在AWS上開發Java應用Java Developer on AWS 在AWS上開發Java應用
Java Developer on AWS 在AWS上開發Java應用
Amazon Web Services
 
Java-Developer-on-AWS
Java-Developer-on-AWSJava-Developer-on-AWS
Java-Developer-on-AWS
Amazon Web Services
 
Building well architected .NET applications - SVC209 - Atlanta AWS Summit
Building well architected .NET applications - SVC209 - Atlanta AWS SummitBuilding well architected .NET applications - SVC209 - Atlanta AWS Summit
Building well architected .NET applications - SVC209 - Atlanta AWS Summit
Amazon Web Services
 
Well Archictecture Framework dotNET.pdf
Well Archictecture Framework dotNET.pdfWell Archictecture Framework dotNET.pdf
Well Archictecture Framework dotNET.pdf
ConradoDeBiasi
 
以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構Amazon Web Services
 
MongoDB World 2018: Tutorial - How to Build Applications with MongoDB Atlas &...
MongoDB World 2018: Tutorial - How to Build Applications with MongoDB Atlas &...MongoDB World 2018: Tutorial - How to Build Applications with MongoDB Atlas &...
MongoDB World 2018: Tutorial - How to Build Applications with MongoDB Atlas &...
MongoDB
 

Similar to 利用 Fargate - 無伺服器的容器環境建置高可用的系統 (20)

利用Fargate無伺服器的容器環境建置高可用的系統
利用Fargate無伺服器的容器環境建置高可用的系統利用Fargate無伺服器的容器環境建置高可用的系統
利用Fargate無伺服器的容器環境建置高可用的系統
 
Modern-Application-Design-with-Amazon-ECS
Modern-Application-Design-with-Amazon-ECSModern-Application-Design-with-Amazon-ECS
Modern-Application-Design-with-Amazon-ECS
 
AWS ECS Workshop A Journey to Modern Applications
AWS ECS Workshop A Journey to Modern ApplicationsAWS ECS Workshop A Journey to Modern Applications
AWS ECS Workshop A Journey to Modern Applications
 
Control your cloud environment with AWS management tools
Control your cloud environment with AWS management toolsControl your cloud environment with AWS management tools
Control your cloud environment with AWS management tools
 
Breaking Up the Monolith with Containers
Breaking Up the Monolith with ContainersBreaking Up the Monolith with Containers
Breaking Up the Monolith with Containers
 
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS SummitGetting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
 
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
 
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
 
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
Need for Speed – Intro To Real-Time Data Streaming Analytics on AWS | AWS Sum...
 
AWS Outposts Update
AWS Outposts UpdateAWS Outposts Update
AWS Outposts Update
 
AWS Containers Day.pdf
AWS Containers Day.pdfAWS Containers Day.pdf
AWS Containers Day.pdf
 
AWSome Day Brasil - Março 2020
AWSome Day Brasil - Março 2020AWSome Day Brasil - Março 2020
AWSome Day Brasil - Março 2020
 
AWSome Day Brasil - Junho 2020
AWSome Day Brasil - Junho 2020AWSome Day Brasil - Junho 2020
AWSome Day Brasil - Junho 2020
 
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
 
Java Developer on AWS 在AWS上開發Java應用
Java Developer on AWS 在AWS上開發Java應用Java Developer on AWS 在AWS上開發Java應用
Java Developer on AWS 在AWS上開發Java應用
 
Java-Developer-on-AWS
Java-Developer-on-AWSJava-Developer-on-AWS
Java-Developer-on-AWS
 
Building well architected .NET applications - SVC209 - Atlanta AWS Summit
Building well architected .NET applications - SVC209 - Atlanta AWS SummitBuilding well architected .NET applications - SVC209 - Atlanta AWS Summit
Building well architected .NET applications - SVC209 - Atlanta AWS Summit
 
Well Archictecture Framework dotNET.pdf
Well Archictecture Framework dotNET.pdfWell Archictecture Framework dotNET.pdf
Well Archictecture Framework dotNET.pdf
 
以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構
 
MongoDB World 2018: Tutorial - How to Build Applications with MongoDB Atlas &...
MongoDB World 2018: Tutorial - How to Build Applications with MongoDB Atlas &...MongoDB World 2018: Tutorial - How to Build Applications with MongoDB Atlas &...
MongoDB World 2018: Tutorial - How to Build Applications with MongoDB Atlas &...
 

More from 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 Fargate
Amazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
Amazon 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
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
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 Workloads
Amazon Web Services
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
Amazon 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 sfatare
Amazon 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 NodeJS
Amazon 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 web
Amazon 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 sfatare
Amazon 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 Service
Amazon Web Services
 

More from 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
 

利用 Fargate - 無伺服器的容器環境建置高可用的系統

  • 1. S U M M I T Taipei
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 利用 Fargate - 無伺服器的容器環 境建置高延展性的系統 Jayson Hsieh Solutions Architect AWS/Solutions Architecture S e s s i o n I D Alan Hsieh R&D Manager Growth Machine/R&D
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Container Services landscape MANAGEMENT Deployment, scheduling, scaling & management of containerized applications HOSTING Where the containers run IMAGE REGISTRY Container image repository
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Your containerized applications Managed by AWS No EC2 Instances to provision, scale or manage Elastic Scale up & down seamlessly. Pay only for what you use Integrated with the AWS ecosystem: VPC Networking, Elastic Load Balancing, IAM Permissions, CloudWatch and more AWS Fargate
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Fully managed container environment with AWS Fargate Bring existing code Production ready Powerful integrations No changes required of existing code, works with existing workflows and microservices built on Amazon ECS ISO, PCI, HIPAA, SOC compliant. Launch ten or tens of thousands of containers in seconds with 99.99% SLA Native AWS integrations for networking, security, CICD, monitoring, and tracing Fargate runs tens of millions of containers for AWS customers every week
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Fargate Scheduling and Orchestration Cluster Manager Placement Engine Availability zone 1 Availability zone 2 Availability zone 3 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1
  • 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Amazon ECS Constructs Cluster • Resource grouping and isolation • IAM permissions boundary Service • Maintains desired # of running tasks • Replaces unhealthy tasks • Elastic Load Balancing integration Task • Running instance of a task definition • One or more containers Task Definition • Template used by Amazon ECS to launch tasks • Parallels to docker run parameters • Defines requirements – e.g. • CPU/Memory • Container image(s) • Logging • AWS Identity and Access Management (IAM) role Container 1 Container 1 Container 1 Container 1Container 1 { ; } JSON
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Fargate Task CPU and Memory configurations 50 different CPU/Memory configurations to choose from CPU Memory 256 (.25 vCPU) 512MB, 1GB, 2GB 512 (.5 vCPU) 1GB, 2GB, 3GB, 4GB 1024 (1 vCPU) 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB 2048 (2 vCPU) Between 4GB and 16GB in 1GB increments 4096 (4 vCPU) Between 8GB and 30GB in 1GB increments
  • 9. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Networking - Launching a Fargate task into a VPC 172.31.0.0/16 Subnet 172.31.1.0/24 Internet Other Entities in VPC EC2 LB DB etc. Launch your Fargate Tasks into subnets Under the hood : • We create an Elastic Network Interface (ENI) • The ENI is allocated a private IP from your subnet • The ENI is attached to your task • Your task now has a private IP from your subnet! You can assign public IPs to your tasks Configure security groups to control inbound & outbound traffic ENI Fargate Task
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Observability “…a measure of how well internal states of a system can be inferred from knowledge of its external outputs.” – Wikipedia
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Monitoring Amazon CloudWatch ECS metrics Service CPU/memory utilization Amazon ECS metadata endpoint Query task metadata and access Docker stats for running tasks 169.254.170.2/v2/metadata 169.254.170.2/v2/stats Partners "read": "2018-11-17T01:39:05.558680889Z", "preread": "2018-11-17T01:39:04.569462567Z", "num_procs": 0, "pids_stats": {}, "network": {}, "memory_stats": { "stats": { "cache": 6127616, "mapped_file": 2117632, "total_inactive_file": 1626112, "pgpgout": 3056, "rss": 3981312, "total_mapped_file": 2117632, "pgpgin": 5524, "pgmajfault": 51, "total_rss": 3981312, "hierarchical_memory_limit": 536870912, "total_pgfault": 5865, "total_active_file": 4501504, "active_anon": 3981312, "total_active_anon": 3981312, "total_pgpgout": 3056,
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Logging Amazon CloudWatch Logs Fargate awslogs log driver STDOUT and STDERR I/O streams Stream logs to Amazon Kinesis Data Streams, Amazon Kinesis Data Firehose, AWS Lambda Subscription filters Container 1 logs logs
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Logging Sidecar container Fargate provides 4GB ephemeral storage Amazon Kinesis agent sidecar pattern (below) Custom logging solutions logs
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Distributed Tracing User AWS X-Ray Analyze and debug distributed applications Useful for microservices environments X-Ray SDK for app instrumentation X-Ray daemon runs as sidecar Service from aws_xray_sdk.core import xray_recorder from aws_xray_sdk.ext.flask.middleware import XRayMiddleware app = Flask(__name__) xray_recorder.configure(service=‘Microservice’) XRayMiddleware(app, xray_recorder)
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Distributed Tracing
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Alerting Amazon CloudWatch Collects metrics, events, logs produced by services/apps Triggers actions based on metric thresholds and event/log patterns Service Integration Amazon SNS User notifications – email, SMS, mobile app System-to-system messaging – AWS Lambda, SQS, HTTP/S endpoint AWS Lambda Event-driven compute Rule Alarm Traditional server metrics events logs AWS Partner / Other Consumer
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T CI/CD for Fargate Amazon EC2 Container Registry AWS CodeCommit AWS Fargate AWS CodeBuild AWS CodePipeline Github Jenkins
  • 19. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Exchange User Behavior • Need very timely price and quantity • Lot of actions trigger by event • Long time and multi-page to watch the price • Massive of limit orders
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Exchange User Behavior • Need very timely price and quantity → Update 5 times per sec • Lot of actions trigger by event → Massive of instant traffic • Long time and multi-page to watch the price → Multiple growth traffics • Massive of limit orders → High concurrent transactions
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T System Requirement Handle high concurrency and scale fast, massive
  • 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Agenda • Service Architecture • Why Fargate • How to work and scale • Maintain and monitor service • Other services
  • 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Architecture - Service Layer
  • 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Architecture - Service Layer
  • 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Solution Comparison ECS EKS FARGATE Management Server + Cluster Server + Cluster Serverless Support Windows + Linux Windows + Linux Linux Integration AWS DevOps tools Cross-platform K8S sync AWS DevOps tools Auto Scaling Container + Server Container + Server Container Pricing Server Server + Cluster CPU / Memory unit Others Support spot instance Community resources Higher security
  • 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Why Fargate We need a stable and massive auto scaling service without maintaining server
  • 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Work With Fargate
  • 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Scalable Components
  • 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T How To Scale • Set policies according to best Response Time for each service • Set Min, Desired, Max number of tasks • Set target tracking by CPU Utilization, Memory Utilization, Request Count • Set step tracking by Unhealthy Count • Set number of tasks in scheduled tasks feature by fixed time
  • 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Renew Task • Automatically renew tasks at a specific time • Set [ Force new deployment ] to renew service
  • 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T CloudWatch - Log Insight • Set log export in ECS Task Definition • View all logs across tasks • Filter some keyword in logs • Visualize log events over time
  • 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Distributed Tracking System • Trace all the requests for all the services • Easier to debug and find the issues • Analysis and tune performance • Visualize the service relationship and request flow
  • 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T XRAY - Service Map • Find the node which has problem at first glance
  • 35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T XRAY - Traces • Record segment flow, time cost, annotations, exceptions
  • 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T XRAY - Analytics • Analysis requests with different periods and figure out the issues
  • 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Hystrix • Circuit breaker by Netflix • Protect service with fault tolerance • Timeout / Breaker / Fallback / Healthy Check • Use to every external request • Monitor healthy status of request • Monitor concurrent loading
  • 38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Hystrix Flow
  • 39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Hystrix Dashboard
  • 40. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Deploy - AWS DevOps Tools
  • 41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Aurora DB • Storage auto scaling • Read replica auto scaling • Automatically failover • Support cross-region replica • Serverless type • Parallel query type
  • 42. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Experience • Understand user behavior and what system we need to provide is very important • Always plan and use easily scalable solutions • Periodically analysis service performance to reset autoscaling policies • Use centralized and analyzed log services in massive of containers and micro services • Planning ahead log data which we may need will solve problem more quickly
  • 43. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Thank you! S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Alan Hsieh alanhsieh@boyu66.net Jayson Hsieh hsiej@amazon.com
  • 44. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I TS U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.