SlideShare a Scribd company logo
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Expedite the Pace of Innovation
with Microservices
Louis Wang,
Cloud Support Engineer,
Amazon Web Services
Shang-Wei Lin,
Software Development Manager,
MobiX Corp
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
Part A: Louis Wang- Cloud Support Engineer, AWS
• Microservices and containers
• AWS containers services
• AWS Services with ECS
Part B: Shang Wei Lin - Software Development Manager, MobiX Corp.
• Company introduction
• The challenge they were facing
• Why AWS ECS
• Summary
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
When the impact of change is small,
release velocity can increase
Monolith
Does everything
Microservices
Does one thing
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monolith development lifecycle
MonitorReleaseTestBuild
Developers
Delivery Pipelines
Services
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Microservice development lifecycle
Developers Services
MonitorReleaseTestBuild
Delivery Pipelines
MonitorReleaseTestBuild
MonitorReleaseTestBuild
MonitorReleaseTestBuild
MonitorReleaseTestBuild
MonitorReleaseTestBuild
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Containers and Docker
A container is a standard unit of software that packages up code and all its
dependencies so the application runs quickly and reliably from one
computing environment to another.1
1 https://www.docker.com/resources/what-container
Server
Operating System
Docker Engine
AppA
AppB
AppC
AppD
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Containers and Microservices
• Do one thing, really well
• Any app, any language
• Isolated execution environment
• Test and deploy same artifact
• Faster startup
Container Container
Container Container
Instance
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Containers have become the standard for how to ship and run your
application in the cloud.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Manually downloading and launching containers by hand is
inefficient and error prone.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
You need container orchestration to help you for expanding your service.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Container Services Landscape
MANAGEMENT
Deployment, scheduling, scaling &
management of containerized
applications
IMAGE REGISTRY
Container image repository
HOSTING
Where the containers run
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Elastic Container Service
Highly Scalable ,
Highly Performant Container
Management System
A managed platform
EC
S
Cluster
Management
Container
Orchestration &
Placement
Deep AWS
Integration
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scheduling and Orchestration
Cluster Manager Placement Engine
ECS AMI
Docker
Agent
ECS
Agent
ECS AMI
Docker
Agent
ECS
Agent
ECS AMI
Docker
Agent
ECS
Agent
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon ECS Constructs
Define application containers:
• Container image URL
• CPU & memory requirements
• Networking type
• etc.
register
Task Definition
run
Task
• A running instantiation of
a task definition
• Use EC2/FARGATE
launch type
create
Service
• Maintain n running copies
• Integrated with ELB
• Unhealthy tasks automatically
replaced
Elastic Load Balancer
create
Cluster
• Infrastructure isolation boundary
• IAM permissions boundary
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon ECS Task Placement
Cluster Constraints
Custom Constraints
Placement Strategies
Apply Filter
• Identify the instances that satisfy the CPU, memory,
and port requirements.
• Identify the instances that satisfy the task placement
constraints.
• Identify the instances that satisfy the task placement
strategies.
• Select the instances for task placement.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon ECS Service Discovery
• Integration with Elastic Load Balancing
• Service Discovery with AWS CloudMap
Route 53
private zone
Request
Register
Register
Register
DNS
Query
ECS Task
ECS Task
ECS Task
Elastic Load Balancing
Container Instance
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon ECS Scaling
• Container Instance - EC2 AutoScaling
• ECS Tasks - Service AutoScaling
• Consider to use AWS Fargate
Elastic Load Balancing
Container InstanceContainer InstanceContainer Instance
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“Just launch 10 copies of my container
without managing container instance. Fargate
lets you focus on designing and building your
applications instead of managing the
infrastructure that runs them.”
x10
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EC2 and Fargate launch type co-exist
Web
Notifications
Availability Zone 1 Availability Zone 2 Availability Zone 3
Task
Task
Task
Task
ECS Cluster
Task
Task
Task
Task
Task
Task
Task
Task
Task
Task
Task
Task
Task
Task
Task
Task
Task
Task
Task
Task
Shopping
Cart
Task
EC2 EC2 EC2 EC2 EC2 EC2
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Developer Tools
AWS Developer Tools
AWS CodePipelineAWS CodeBuildAWS CodeCommit AWS CodeDeploy
AWS CodeStar
AWS X-Ray
AWS Command Line InterfaceAWS Tools and SDKsAWS Cloud9
The AWS Developer Tools is a set of services designed to enable developers and
IT operations professionals practicing DevOps to rapidly and safely deliver
software.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Code Services
End-to-end software release workflow using AWS Code services
ProductionTestBuildSource
AWS CodeBuildAWS CodeCommit AWS CodeDeploy
AWS CodePipeline
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS ECS with Code Services
Use AWS CodeDeploy to implement blue/green deployments for Amazon ECS and
AWS Fargate.
Tasks
AWS Cloud
Tasks
Tasks
Thank you!
© 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
基於 AWS 之上建構
因應快速變動的基礎設施
Shang-Wei Lin
Software Development Manager
MobiX Corp
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Agenda
• 公司介紹
• 開發文化
• 成長階段中每個架構挑戰
• Why ECS
• 結論&未來展望
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
好衣網 名片網
Photo
123
好菜網 好魚網
3C
市集
好吃
市集
生活
市集
2012年
3,000萬
2017年
37億/上櫃
• 創立於2012年,輕資產電商,專注於電商平台經營
• 快速因應市場趨勢與需求,不斷推陳出新不同品牌
• 2012年~2017年,營收成長100倍。於2017年上櫃
松果
購物
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
• 創立於2016年,B2B2C 電商平台
• 站台商品數高達10萬種以上
• 2018 年松果購物 App 下載數突破 135 萬、年增 100% 以上
• 2019年公開發行,預計2020年上櫃
創立
2016年 2019年6月
公開
發行
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
• 不斷增減且規模不一的網站
• 交易額增長迅速
• 行銷資源快速變動流量變化大
快速成長
多種品牌
IT & RD 部門的挑戰
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
開發文化
• 於 2012 開始就基於 AWS 的全雲端架構
• 聚焦核心業務的開發團隊
• 快速迭代的針對關鍵問題小幅調整架構測試
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
2013年 : 架構階段 1
佈署方式
營運現狀
Challenge
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
2014年 : 架構階段 2
佈署方式
營運現狀
Challenge
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
2015年 : 架構階段 3
佈署方式
營運現狀
Challenge
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
2016年 : 架構階段 4
佈署方式
營運現狀
Challenge
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
關鍵問題
流量 X 擴展 = 複雜
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
關鍵問題
• 伺服器維運與頻繁調整
• 數個異質性網站維運
• 漸進式微服務化
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
關鍵問題
• 因應彈性的行銷策略,流量變化幅度大
• 規模化後的微服務化
o search、redirect、tracking、 image
processing ...
• 營收驅動需求增加造成架構逐漸複雜化
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
解決方案
伺服器配置文件化
快速上手的 docker production 環境
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
解決方案 container
orchestration
Scheduling and Orchestration
Cluster Manager Placement Engine
Running Containers At Scale
Availability Zone #1 Availability Zone #2 Availability Zone #3
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
解決方案 ECS 架構
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
解決方案 ECS 核心概念
Task Definition
service task
docker image
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
2018年~現在 : 最新架構圖
所有服務都可以透過 ECS Deploy 與 auto scaling
成功在極低的負擔下導入 auto scaling 的架構
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
• Amazon ECS Task Placement Strategies
ECS 實戰坑坑
Service A
Service B
Service C
ECS cluster
Service A
Service A
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
• Amazon ECS Task Placement Strategies
統一 cluaster service 的資源大小,平均叢集資源
ECS 實戰坑坑
Service A
Service B Service C
ECS cluster
Service A Service A
Service B
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
解決方案 - 總結
• 伺服器維運困難
o Docker 化、ECS 自動資源配置
• 人工擴展
o 架構重整
 Secret Manager
 CloudWatch
o ECS 自動配置 container 數量
• 部署流程複雜
o CI/CD 化
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
結論
簡單 彈性 成本 擴展
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
未來
● Auto Scaling Group Predictive Scaling for EC2
● Auto Scaling Group with Multiple Instance
Types
● ECS Fargate
● 持續推出的新功能
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
未來
全端、前端、後端
© 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.

More Related Content

What's hot

What's hot (20)

Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019
 
Journey into the Cloud with VMware Cloud on AWS: Deep Dive - CMP303 - Anaheim...
Journey into the Cloud with VMware Cloud on AWS: Deep Dive - CMP303 - Anaheim...Journey into the Cloud with VMware Cloud on AWS: Deep Dive - CMP303 - Anaheim...
Journey into the Cloud with VMware Cloud on AWS: Deep Dive - CMP303 - Anaheim...
 
在-MongoDB-Cloud-上構建無服務器化應用
在-MongoDB-Cloud-上構建無服務器化應用在-MongoDB-Cloud-上構建無服務器化應用
在-MongoDB-Cloud-上構建無服務器化應用
 
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
 
如何成功的完成混合雲遷移專案
如何成功的完成混合雲遷移專案如何成功的完成混合雲遷移專案
如何成功的完成混合雲遷移專案
 
Connecting your devices at scale, ft. Discovery - SVC205 - New York AWS Summit
Connecting your devices at scale, ft. Discovery - SVC205 - New York AWS SummitConnecting your devices at scale, ft. Discovery - SVC205 - New York AWS Summit
Connecting your devices at scale, ft. Discovery - SVC205 - New York AWS Summit
 
AWS 如何協助客戶建立 DevOps 流程
AWS 如何協助客戶建立 DevOps 流程AWS 如何協助客戶建立 DevOps 流程
AWS 如何協助客戶建立 DevOps 流程
 
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 ...
 
以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構
 
AWS Dev Day
AWS Dev DayAWS Dev Day
AWS Dev Day
 
“Lift and shift” storage for business-critical applications - STG203 - New Yo...
“Lift and shift” storage for business-critical applications - STG203 - New Yo...“Lift and shift” storage for business-critical applications - STG203 - New Yo...
“Lift and shift” storage for business-critical applications - STG203 - New Yo...
 
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
 
How to speed up and scale your innovation efforts - MAD203 - Chicago AWS Summit
How to speed up and scale your innovation efforts - MAD203 - Chicago AWS SummitHow to speed up and scale your innovation efforts - MAD203 - Chicago AWS Summit
How to speed up and scale your innovation efforts - MAD203 - Chicago AWS Summit
 
What's New in Amazon Aurora - ADB203 - Anaheim AWS Summit
What's New in Amazon Aurora - ADB203 - Anaheim AWS SummitWhat's New in Amazon Aurora - ADB203 - Anaheim AWS Summit
What's New in Amazon Aurora - ADB203 - Anaheim AWS Summit
 
Transform with Cloud to drive your Future | AWS Summit Tel Aviv 2019
Transform with Cloud to drive your Future | AWS Summit Tel Aviv 2019Transform with Cloud to drive your Future | AWS Summit Tel Aviv 2019
Transform with Cloud to drive your Future | AWS Summit Tel Aviv 2019
 
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
 
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...
 
利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdf利用 AWS Step Functions 建構穩定的資料處理流程.pdf
利用 AWS Step Functions 建構穩定的資料處理流程.pdf
 
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...
 
從業人員指南-如何像技術專家一樣守護您的雲端安全
從業人員指南-如何像技術專家一樣守護您的雲端安全從業人員指南-如何像技術專家一樣守護您的雲端安全
從業人員指南-如何像技術專家一樣守護您的雲端安全
 

Similar to 利用微服務加速創新的步伐

Breaking Up the Monolith with Containers
Breaking Up the Monolith with ContainersBreaking Up the Monolith with Containers
Breaking Up the Monolith with Containers
Amazon Web Services
 
DevOps - Moving to DevOps the Amazon Way
DevOps - Moving to DevOps the Amazon WayDevOps - Moving to DevOps the Amazon Way
DevOps - Moving to DevOps the Amazon Way
Amazon Web Services
 
以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構
Amazon Web Services
 

Similar to 利用微服務加速創新的步伐 (20)

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
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
 
Breaking Up the Monolith with Containers
Breaking Up the Monolith with ContainersBreaking Up the Monolith with Containers
Breaking Up the Monolith with Containers
 
DevConZM - Modern Applications Development in the Cloud
DevConZM - Modern Applications Development in the CloudDevConZM - Modern Applications Development in the Cloud
DevConZM - Modern Applications Development in the Cloud
 
Securing Container-Based Applications at the Speed of DevOps
Securing Container-Based Applications at the Speed of DevOpsSecuring Container-Based Applications at the Speed of DevOps
Securing Container-Based Applications at the Speed of DevOps
 
Securing Container-Based Applications at the Speed of DevOps
Securing Container-Based Applications at the Speed of DevOpsSecuring Container-Based Applications at the Speed of DevOps
Securing Container-Based Applications at the Speed of DevOps
 
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
 
Perfecting the Media Workflow Experience on AWS - Ben Masek, 월드와이드 미디어 사업개발 헤...
Perfecting the Media Workflow Experience on AWS - Ben Masek, 월드와이드 미디어 사업개발 헤...Perfecting the Media Workflow Experience on AWS - Ben Masek, 월드와이드 미디어 사업개발 헤...
Perfecting the Media Workflow Experience on AWS - Ben Masek, 월드와이드 미디어 사업개발 헤...
 
DevOps - Moving to DevOps the Amazon Way
DevOps - Moving to DevOps the Amazon WayDevOps - Moving to DevOps the Amazon Way
DevOps - Moving to DevOps the Amazon Way
 
以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構
 
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...
 
AWS Summit Singapore 2019 | Operating Microservices at Hyperscale
AWS Summit Singapore 2019 | Operating Microservices at HyperscaleAWS Summit Singapore 2019 | Operating Microservices at Hyperscale
AWS Summit Singapore 2019 | Operating Microservices at Hyperscale
 
AWS Containers Day.pdf
AWS Containers Day.pdfAWS Containers Day.pdf
AWS Containers Day.pdf
 
More Containers Less Operations
More Containers Less OperationsMore Containers Less Operations
More Containers Less Operations
 
Executing a Large-Scale Migration to AWS
Executing a Large-Scale Migration to AWSExecuting a Large-Scale Migration to AWS
Executing a Large-Scale Migration to AWS
 
Monolithic to Microservices Demystified
Monolithic to Microservices DemystifiedMonolithic to Microservices Demystified
Monolithic to Microservices Demystified
 
Modern Applications Development on AWS
Modern Applications Development on AWSModern Applications Development on AWS
Modern Applications Development on AWS
 
A Culture of Rapid Innovation with DevOps, Microservices, & Serverless - MAD2...
A Culture of Rapid Innovation with DevOps, Microservices, & Serverless - MAD2...A Culture of Rapid Innovation with DevOps, Microservices, & Serverless - MAD2...
A Culture of Rapid Innovation with DevOps, Microservices, & Serverless - MAD2...
 
Inovação Rápida: O caso de negócio para desenvolvimento de aplicações modernas.
Inovação Rápida: O caso de negócio para desenvolvimento de aplicações modernas.Inovação Rápida: O caso de negócio para desenvolvimento de aplicações modernas.
Inovação Rápida: O caso de negócio para desenvolvimento de aplicações modernas.
 

More from 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 AWS
Amazon 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 Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon 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
 

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
 

利用微服務加速創新的步伐

  • 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Expedite the Pace of Innovation with Microservices Louis Wang, Cloud Support Engineer, Amazon Web Services Shang-Wei Lin, Software Development Manager, MobiX Corp
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda Part A: Louis Wang- Cloud Support Engineer, AWS • Microservices and containers • AWS containers services • AWS Services with ECS Part B: Shang Wei Lin - Software Development Manager, MobiX Corp. • Company introduction • The challenge they were facing • Why AWS ECS • Summary
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. When the impact of change is small, release velocity can increase Monolith Does everything Microservices Does one thing
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monolith development lifecycle MonitorReleaseTestBuild Developers Delivery Pipelines Services
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Microservice development lifecycle Developers Services MonitorReleaseTestBuild Delivery Pipelines MonitorReleaseTestBuild MonitorReleaseTestBuild MonitorReleaseTestBuild MonitorReleaseTestBuild MonitorReleaseTestBuild
  • 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Containers and Docker A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.1 1 https://www.docker.com/resources/what-container Server Operating System Docker Engine AppA AppB AppC AppD
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Containers and Microservices • Do one thing, really well • Any app, any language • Isolated execution environment • Test and deploy same artifact • Faster startup Container Container Container Container Instance
  • 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Containers have become the standard for how to ship and run your application in the cloud.
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Manually downloading and launching containers by hand is inefficient and error prone.
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. You need container orchestration to help you for expanding your service.
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Container Services Landscape MANAGEMENT Deployment, scheduling, scaling & management of containerized applications IMAGE REGISTRY Container image repository HOSTING Where the containers run
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Elastic Container Service Highly Scalable , Highly Performant Container Management System A managed platform EC S Cluster Management Container Orchestration & Placement Deep AWS Integration
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Scheduling and Orchestration Cluster Manager Placement Engine ECS AMI Docker Agent ECS Agent ECS AMI Docker Agent ECS Agent ECS AMI Docker Agent ECS Agent
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS Constructs Define application containers: • Container image URL • CPU & memory requirements • Networking type • etc. register Task Definition run Task • A running instantiation of a task definition • Use EC2/FARGATE launch type create Service • Maintain n running copies • Integrated with ELB • Unhealthy tasks automatically replaced Elastic Load Balancer create Cluster • Infrastructure isolation boundary • IAM permissions boundary
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS Task Placement Cluster Constraints Custom Constraints Placement Strategies Apply Filter • Identify the instances that satisfy the CPU, memory, and port requirements. • Identify the instances that satisfy the task placement constraints. • Identify the instances that satisfy the task placement strategies. • Select the instances for task placement.
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS Service Discovery • Integration with Elastic Load Balancing • Service Discovery with AWS CloudMap Route 53 private zone Request Register Register Register DNS Query ECS Task ECS Task ECS Task Elastic Load Balancing Container Instance
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS Scaling • Container Instance - EC2 AutoScaling • ECS Tasks - Service AutoScaling • Consider to use AWS Fargate Elastic Load Balancing Container InstanceContainer InstanceContainer Instance
  • 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. “Just launch 10 copies of my container without managing container instance. Fargate lets you focus on designing and building your applications instead of managing the infrastructure that runs them.” x10
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. EC2 and Fargate launch type co-exist Web Notifications Availability Zone 1 Availability Zone 2 Availability Zone 3 Task Task Task Task ECS Cluster Task Task Task Task Task Task Task Task Task Task Task Task Task Task Task Task Task Task Task Task Shopping Cart Task EC2 EC2 EC2 EC2 EC2 EC2
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Developer Tools AWS Developer Tools AWS CodePipelineAWS CodeBuildAWS CodeCommit AWS CodeDeploy AWS CodeStar AWS X-Ray AWS Command Line InterfaceAWS Tools and SDKsAWS Cloud9 The AWS Developer Tools is a set of services designed to enable developers and IT operations professionals practicing DevOps to rapidly and safely deliver software.
  • 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Code Services End-to-end software release workflow using AWS Code services ProductionTestBuildSource AWS CodeBuildAWS CodeCommit AWS CodeDeploy AWS CodePipeline
  • 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS ECS with Code Services Use AWS CodeDeploy to implement blue/green deployments for Amazon ECS and AWS Fargate. Tasks AWS Cloud Tasks Tasks
  • 26. Thank you! © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 基於 AWS 之上建構 因應快速變動的基礎設施 Shang-Wei Lin Software Development Manager MobiX Corp
  • 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Agenda • 公司介紹 • 開發文化 • 成長階段中每個架構挑戰 • Why ECS • 結論&未來展望
  • 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 好衣網 名片網 Photo 123 好菜網 好魚網 3C 市集 好吃 市集 生活 市集 2012年 3,000萬 2017年 37億/上櫃 • 創立於2012年,輕資產電商,專注於電商平台經營 • 快速因應市場趨勢與需求,不斷推陳出新不同品牌 • 2012年~2017年,營收成長100倍。於2017年上櫃 松果 購物
  • 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • 創立於2016年,B2B2C 電商平台 • 站台商品數高達10萬種以上 • 2018 年松果購物 App 下載數突破 135 萬、年增 100% 以上 • 2019年公開發行,預計2020年上櫃 創立 2016年 2019年6月 公開 發行
  • 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • 不斷增減且規模不一的網站 • 交易額增長迅速 • 行銷資源快速變動流量變化大 快速成長 多種品牌 IT & RD 部門的挑戰
  • 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 開發文化 • 於 2012 開始就基於 AWS 的全雲端架構 • 聚焦核心業務的開發團隊 • 快速迭代的針對關鍵問題小幅調整架構測試
  • 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 2013年 : 架構階段 1 佈署方式 營運現狀 Challenge
  • 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 2014年 : 架構階段 2 佈署方式 營運現狀 Challenge
  • 35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 2015年 : 架構階段 3 佈署方式 營運現狀 Challenge
  • 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 2016年 : 架構階段 4 佈署方式 營運現狀 Challenge
  • 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 關鍵問題 流量 X 擴展 = 複雜
  • 38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 關鍵問題 • 伺服器維運與頻繁調整 • 數個異質性網站維運 • 漸進式微服務化
  • 39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 關鍵問題 • 因應彈性的行銷策略,流量變化幅度大 • 規模化後的微服務化 o search、redirect、tracking、 image processing ... • 營收驅動需求增加造成架構逐漸複雜化
  • 40. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 解決方案 伺服器配置文件化 快速上手的 docker production 環境
  • 41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 解決方案 container orchestration Scheduling and Orchestration Cluster Manager Placement Engine Running Containers At Scale Availability Zone #1 Availability Zone #2 Availability Zone #3
  • 42. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 解決方案 ECS 架構
  • 43. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 解決方案 ECS 核心概念 Task Definition service task docker image
  • 44. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 2018年~現在 : 最新架構圖 所有服務都可以透過 ECS Deploy 與 auto scaling 成功在極低的負擔下導入 auto scaling 的架構
  • 45. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • Amazon ECS Task Placement Strategies ECS 實戰坑坑 Service A Service B Service C ECS cluster Service A Service A
  • 46. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • Amazon ECS Task Placement Strategies 統一 cluaster service 的資源大小,平均叢集資源 ECS 實戰坑坑 Service A Service B Service C ECS cluster Service A Service A Service B
  • 47. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 解決方案 - 總結 • 伺服器維運困難 o Docker 化、ECS 自動資源配置 • 人工擴展 o 架構重整  Secret Manager  CloudWatch o ECS 自動配置 container 數量 • 部署流程複雜 o CI/CD 化
  • 48. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 結論 簡單 彈性 成本 擴展
  • 49. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 未來 ● Auto Scaling Group Predictive Scaling for EC2 ● Auto Scaling Group with Multiple Instance Types ● ECS Fargate ● 持續推出的新功能
  • 50. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 未來 全端、前端、後端
  • 51. © 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.