SlideShare a Scribd company logo
2018/01/12
Architecting for the Cloud
AWS Best Practices
1
Versions
2
● Architecting for the Cloud: AWS Best Practices - (Feb 2016)
○ 比較官腔的寫法
● Architecting for the Cloud: AWS Best Practices - (Jan 2011)
○ 比較有人性的寫法
Cloud Computing Difference
3
Cloud Computing Difference
4
● IT Assets Become Programmable Resources
● Global, Available, and Unlimited Capacity
● Higher Level Managed Services
● Security Built In
5
Design Principles
6
● Scalability
● Disposable Resources Instead of Fixed Servers
● Automation
● Loose Coupling
● Services, Not Servers
● Databases
● Removing Single Points of Failure
● Optimize for Cost
● Caching
● Security
Design Principles
7
● Scaling Vertically
○ Scale-up, scale-down
○ c4.large → c4.xlarge → c4.2xlarge
○ CPU, Memory, IO
● Scaling Horizontally → Scale-out, Scale-in
○ Stateless Applications
○ Stateless Components
○ Stateful Components
○ Distributed Processing
● Elasticity is one of the fundamental properties of the cloud.
○ EC2, ELB, ECS, EBS, EIP, ENI,
Scalability
8
● Push mode: distribute a workload is through the use of a load balancing solution
○ ELB routes incoming application request across multiple EC2 instances
● Pull mode: async event-driven workloads do not require a load balancing solution.
○ tasks that need to be performed or data that need to be processed could be stored as
messages in a queue using Amazon Simple Queue Service (Amazon SQS) or as a streaming
data solution like Amazon Kinesis.
Stateless Applications
9
10Architecting for the Cloud: AWS Best Practices - (Jan 2011)
11
● Instantiating Compute Resources
○ Bootstrapping → EC2 Userdata
○ Golden Images or Containerize
○ Hybrid
● Infrastructure as Code
Disposable Resources Instead of Fixed Servers
12
06. Resource Provisioning and DevOps
Hardware (c4.xlarge)
Operating System
Language
Integreter
Application
Server
Tools Code
Build an Environment
Amazon Machine Image
(AMI)
instances
create-image
run-instances
13
*.lab1.abc.com
*.lab2.abc.com
*.lab3.abc.com
Infra as Code: CloudFormation / Terraform
Route 53
Workers / API / Batch
ELB: BBB-lab-abc-com
DNS: BBB.labN.abc.com
db.lab.abc.com
(RDS)
14
ELB: AAA-lab-abc-com
DNS: AAA.labN.abc.com
ELB: BBB-lab-abc-com
DNS: BBB.labN.abc.com
AutoScalingGroup
CloudFormation - Infra
CloudFormation - Cloud Services
awsops
gfs.lab.abc.com
(GlusterFS)
15
● Elastic Beanstalk: PaaS
● EC2 Auto recovery
● Auto Scaling
● CloudWatch Alarms
● CloudWatch Events
● OpsWorks Lifecycle events
● Lambda Scheduled events
Automation
16
Auto Scaling
● 前提:Resource Provisioning - 環境建置自動化
● 白話文:
機器 (零件) 隨時能被置換
能砍掉重練
17
● Well-Defined Interfaces
● Service Discovery
● Asynchronous Integration
○ decouple your components
● Graceful Failure, design for failure and nothing will fail
○ Route53 policy
Loose Coupling (鬆耦合)
18
Well-defined Interfaces
● 清楚 Input / Output
○ 資料結構
○ 資料型態
○ 清楚的錯誤定義
19
Decouple Your Components
20Architecting for the Cloud: AWS Best Practices - (Jan 2011)
Design for failure
21
SRE: Site Reliability Engineering
CH13 Emergency Response
Things break; that’s life.
● Managed Services
○ SQS, CloudWatch, ELB, S3, EBS RDS, SES ...
● Serverless Architectures
○ Lambda, API Gateway
○ Whitepaper: Serverless Architectures with AWS Lambda (November 2017)
Services, Not Servers
22
以下摘錄自『可口可樂的 Serverless 之旅』
● IT 人員花太多時間在解決網路問題、找尋故障排除方法等吃力不討好,又無法彰顯 IT價值的事務。
● IT 團隊將一半以上的時間浪費在對企業毫無價 值的問題。不僅企業質疑IT團隊的貢獻度,就連 IT人自
身的生活品質也大受影響 ,而這幾乎是每個企業都面臨的現象。
● 系統維運還包含更新修補檔、監控系統等工作。例如一早上班發現一臺機器必須更新 18個套件的安全
更新檔,對開發者來 說可是沈重的負擔。
● DevOps要能成功,關鍵在於 IT架構的可程式化與自動化,也就是 Infrastructure as Code。即使企業
已經採用雲端虛擬機器服務,但系統管理若仍透過網頁介面手動設定與調整,這樣的管理方法勢必無
法擴張,發揮不了DevOps的效果。
Serverless
Source: https://www.ithome.com.tw/news/112431
23
Servers AAHHHHHH!!!
Ref: Getting Started with Serverless Architectures
OS Patch
Instance Size
Service Capacity
Cost and Budget
OS Version
User Permission
OS Utilization
Performance OS Optimize
Package for Services
Config Management
Hardware Failuare
25
Operation Tasks for Servers
26
● Relational Databases
● NoSQL Databases
● Data Warehouse (Big Data)
● Search
Design Principles - Database
27
● Scalability
● High Availability
● Anti-Patterns
● Introducing Redundancy
○ standby or active mode
○ when a resource fails, functionality is recovered on a 2nd resource using a process call
failover
● Detect Failure
○ Route53 Health Check
○ EC2 auto recovery
○ Auto Scaling
Removing Single Points of Failure (SPOF)
28
Removing Single Points of Failure (SPOF)
29
● Durable Data Storage
○ Maintain a variety of data
○ ync replication -> RAID1, RAID5, GFS (GlusterFS)
○ Durability: No replacement for backups
○ DR: RPO, RTO
● Automated Multi-Data Center Resilience
○ MultiAZ, VPC AZs
○ ELB AZ, DynamoDB, RDS
○ Region Levels
● Fault Isolation and Traditional Horizontal Scaling
○ Shuffle Sharding
Reference
1. Site Reliability Engineering
a. Chapter 22 - Addressing Cascading Failures
b. Chapter 23 - Managing Critical State: Distributed Consensus for Reliability
2. 高品質微服務
a. 第五章 容錯與災難預防
3. AWS Whitepapers
a. AWS Well-Architected Framework - Reliability Pillar (December 2017)
b. Building Fault-Tolerant Applications on AWS (October 2011)
30
31
● Right Sizing
● Elasticity
● Take Advantage of the Variety of Purchasing Options
○ Reserved Capacity
○ Spot Instances
Optimize for Cost
32
33Architecting for the Cloud: AWS Best Practices - (Jan 2011)
● Utilize AWS Features for Defense in Depth
● Offload Security Responsibility to AWS
● Reduce Privileged Access
● Security as Code
● Real-Time Auditing
Security
34
35
36
What is Architecture?
37
What is Software Architecture?
Cloud Native
38
https://pivotal.io/cloud-native
https://www.cncf.io/
39
40
Reference
● Architecting for the Cloud (Feb, 2016) (PDF)
● Architecting on The Cloud (slideshare)
● Building Microservices
● Clean Architecture
● Site Reliability Engineering
41
42
43
End

More Related Content

What's hot (20)

PDF
The Road Most Traveled: A Kafka Story | Heikki Nousiainen, Aiven
HostedbyConfluent
 
PDF
Cloud Native 下的應用網路設計
inwin stack
 
PDF
Achieve Data & Operational Sovereignty: Managing Hybrid & Edge EKS Deployment...
Weaveworks
 
PDF
Red Hat multi-cluster management & what's new in OpenShift
Kangaroot
 
PPTX
SOCstock 2021 The Cloud-native SOC
Anton Chuvakin
 
PDF
Cloud-Native Operations with Kubernetes and CI/CD
VMware Tanzu
 
PDF
運用高效、敏捷全新平台極速落實雲原生開發
inwin stack
 
PPTX
Cloud Economics - Crayon Optimization Services
Anfernee Bonds
 
PDF
5 lessons learned for successful migration to Confluent cloud | Natan Silinit...
HostedbyConfluent
 
PPTX
CDK - The next big thing - Quang Phuong
Vietnam Open Infrastructure User Group
 
PDF
Stream Processing with Kafka and KSQL in Jupiter | Namit Mahuvakar, Jupiter
HostedbyConfluent
 
PDF
Distributed Enterprise Monitoring and Management of Apache Kafka (William McL...
HostedbyConfluent
 
PDF
CNCF Live Webinar: Kubernetes 1.23
LibbySchulze
 
PPTX
Microservices with Spring
Carlos Cavero Barca
 
PDF
Pivotal Cloud Foundry 2.6: A First Look
VMware Tanzu
 
PPTX
An Introduction to Confluent Cloud: Apache Kafka as a Service
confluent
 
PDF
Scaling Monitoring At Databricks From Prometheus to M3
LibbySchulze
 
PPTX
Modern vSphere Monitoring and Dashboard using InfluxDB, Telegraf and Grafana
InfluxData
 
PPTX
Why cloud native matters
Cheryl Hung
 
PDF
Efficient IT operations using monitoring systems and standardized tools - Ici...
Icinga
 
The Road Most Traveled: A Kafka Story | Heikki Nousiainen, Aiven
HostedbyConfluent
 
Cloud Native 下的應用網路設計
inwin stack
 
Achieve Data & Operational Sovereignty: Managing Hybrid & Edge EKS Deployment...
Weaveworks
 
Red Hat multi-cluster management & what's new in OpenShift
Kangaroot
 
SOCstock 2021 The Cloud-native SOC
Anton Chuvakin
 
Cloud-Native Operations with Kubernetes and CI/CD
VMware Tanzu
 
運用高效、敏捷全新平台極速落實雲原生開發
inwin stack
 
Cloud Economics - Crayon Optimization Services
Anfernee Bonds
 
5 lessons learned for successful migration to Confluent cloud | Natan Silinit...
HostedbyConfluent
 
CDK - The next big thing - Quang Phuong
Vietnam Open Infrastructure User Group
 
Stream Processing with Kafka and KSQL in Jupiter | Namit Mahuvakar, Jupiter
HostedbyConfluent
 
Distributed Enterprise Monitoring and Management of Apache Kafka (William McL...
HostedbyConfluent
 
CNCF Live Webinar: Kubernetes 1.23
LibbySchulze
 
Microservices with Spring
Carlos Cavero Barca
 
Pivotal Cloud Foundry 2.6: A First Look
VMware Tanzu
 
An Introduction to Confluent Cloud: Apache Kafka as a Service
confluent
 
Scaling Monitoring At Databricks From Prometheus to M3
LibbySchulze
 
Modern vSphere Monitoring and Dashboard using InfluxDB, Telegraf and Grafana
InfluxData
 
Why cloud native matters
Cheryl Hung
 
Efficient IT operations using monitoring systems and standardized tools - Ici...
Icinga
 

Similar to Study Notes - Architecting for the cloud (AWS Best Practices, Feb 2016) (20)

PDF
NetflixOSS Meetup season 3 episode 1
Ruslan Meshenberg
 
PDF
Public Cloud Workshop
Amer Ather
 
PPTX
Cloud Architecture best practices
Omid Vahdaty
 
PPTX
Automating using Ansible
Alok Patra
 
PDF
Introducing the ultimate MariaDB cloud, SkySQL
MariaDB plc
 
PDF
OSOM - Operations in the Cloud
Marcela Oniga
 
PDF
OSOM Operations in the Cloud
mstuparu
 
PDF
Netflix Container Scheduling and Execution - QCon New York 2016
aspyker
 
PDF
Scheduling a fuller house - Talk at QCon NY 2016
Sharma Podila
 
PDF
002 AWSSlides.pdf
DrBashirMSaad
 
PDF
Running Cassandra in AWS
DataStax Academy
 
PDF
State of serverless
Anurag Saran
 
PDF
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
javier ramirez
 
PPTX
Data Scotland 2019: You can run SQL Server on AWS
John McCormack
 
PDF
Effectively deploying hadoop to the cloud
Avinash Ramineni
 
PDF
AWS Bulgaria: Re:invent 2017 Recap
Ivaylo Bratoev
 
PDF
Ceph Research at UCSC
Ceph Community
 
PPTX
Ghost Environment
PratipD
 
PDF
Testing kubernetes and_open_shift_at_scale_20170209
mffiedler
 
PDF
Configuration management state of the art
Jean Parpaillon
 
NetflixOSS Meetup season 3 episode 1
Ruslan Meshenberg
 
Public Cloud Workshop
Amer Ather
 
Cloud Architecture best practices
Omid Vahdaty
 
Automating using Ansible
Alok Patra
 
Introducing the ultimate MariaDB cloud, SkySQL
MariaDB plc
 
OSOM - Operations in the Cloud
Marcela Oniga
 
OSOM Operations in the Cloud
mstuparu
 
Netflix Container Scheduling and Execution - QCon New York 2016
aspyker
 
Scheduling a fuller house - Talk at QCon NY 2016
Sharma Podila
 
002 AWSSlides.pdf
DrBashirMSaad
 
Running Cassandra in AWS
DataStax Academy
 
State of serverless
Anurag Saran
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
javier ramirez
 
Data Scotland 2019: You can run SQL Server on AWS
John McCormack
 
Effectively deploying hadoop to the cloud
Avinash Ramineni
 
AWS Bulgaria: Re:invent 2017 Recap
Ivaylo Bratoev
 
Ceph Research at UCSC
Ceph Community
 
Ghost Environment
PratipD
 
Testing kubernetes and_open_shift_at_scale_20170209
mffiedler
 
Configuration management state of the art
Jean Parpaillon
 
Ad

More from Rick Hwang (20)

PDF
在生命轉彎的地方 - 從軟體開發職涯,探索人生
Rick Hwang
 
PDF
20230829 - 探索職涯,複利人生
Rick Hwang
 
PDF
2023 08 - SRE 實踐與開發平台指南 - 書友見面會
Rick Hwang
 
PDF
20230215 - 凝聚團隊共識的溝通方法 (Effective Team Communication)
Rick Hwang
 
PDF
20230618 - 軟體測試實務新書發表會 - 從品質與測試,讓軟體再次偉大
Rick Hwang
 
PDF
CH02 API Governance
Rick Hwang
 
PDF
Chapter 8. Partial updates and retrievals.pdf
Rick Hwang
 
PDF
Ch09 Custom Methods
Rick Hwang
 
PDF
AWS Career Exploration Day
Rick Hwang
 
PDF
從理想、到現實的距離,開啟品味軟體測試之路 - 台灣軟體工程協會 (20220813)
Rick Hwang
 
PDF
SRE Conf 2022 - 91APP 在 AWS 上的 SRE 實踐之路
Rick Hwang
 
PDF
導讀持續交付 2.0 - CH02 價值探索環
Rick Hwang
 
PDF
2020 AWS Summit - 如何有效管理 AWS 的成本結構與系統架構
Rick Hwang
 
PDF
災難演練 @ AWS 實戰分享 (Using AWS for Disaster Recovery)
Rick Hwang
 
PDF
Software Development Process v1.5 - 20121214
Rick Hwang
 
PDF
第三章 建立良好的人際關係網路
Rick Hwang
 
PDF
Wiki in Teamroom - Connected Mind
Rick Hwang
 
PDF
導讀持續交付 2.0 - 談當代軟體交付之虛實融合
Rick Hwang
 
PDF
Study Notes - Event-Driven Data Management for Microservices
Rick Hwang
 
PDF
Study Notes - Using an API Gateway
Rick Hwang
 
在生命轉彎的地方 - 從軟體開發職涯,探索人生
Rick Hwang
 
20230829 - 探索職涯,複利人生
Rick Hwang
 
2023 08 - SRE 實踐與開發平台指南 - 書友見面會
Rick Hwang
 
20230215 - 凝聚團隊共識的溝通方法 (Effective Team Communication)
Rick Hwang
 
20230618 - 軟體測試實務新書發表會 - 從品質與測試,讓軟體再次偉大
Rick Hwang
 
CH02 API Governance
Rick Hwang
 
Chapter 8. Partial updates and retrievals.pdf
Rick Hwang
 
Ch09 Custom Methods
Rick Hwang
 
AWS Career Exploration Day
Rick Hwang
 
從理想、到現實的距離,開啟品味軟體測試之路 - 台灣軟體工程協會 (20220813)
Rick Hwang
 
SRE Conf 2022 - 91APP 在 AWS 上的 SRE 實踐之路
Rick Hwang
 
導讀持續交付 2.0 - CH02 價值探索環
Rick Hwang
 
2020 AWS Summit - 如何有效管理 AWS 的成本結構與系統架構
Rick Hwang
 
災難演練 @ AWS 實戰分享 (Using AWS for Disaster Recovery)
Rick Hwang
 
Software Development Process v1.5 - 20121214
Rick Hwang
 
第三章 建立良好的人際關係網路
Rick Hwang
 
Wiki in Teamroom - Connected Mind
Rick Hwang
 
導讀持續交付 2.0 - 談當代軟體交付之虛實融合
Rick Hwang
 
Study Notes - Event-Driven Data Management for Microservices
Rick Hwang
 
Study Notes - Using an API Gateway
Rick Hwang
 
Ad

Recently uploaded (20)

PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PDF
monopile foundation seminar topic for civil engineering students
Ahina5
 
PPTX
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
PDF
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PPTX
Element 7. CHEMICAL AND BIOLOGICAL AGENT.pptx
merrandomohandas
 
PDF
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PPTX
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
PDF
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
PDF
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PPTX
Snet+Pro+Service+Software_SNET+Pro+2+Instructions.pptx
jenilsatikuvar1
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PPT
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
monopile foundation seminar topic for civil engineering students
Ahina5
 
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Day2 B2 Best.pptx
helenjenefa1
 
Element 7. CHEMICAL AND BIOLOGICAL AGENT.pptx
merrandomohandas
 
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
Snet+Pro+Service+Software_SNET+Pro+2+Instructions.pptx
jenilsatikuvar1
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 

Study Notes - Architecting for the cloud (AWS Best Practices, Feb 2016)

  • 1. 2018/01/12 Architecting for the Cloud AWS Best Practices 1
  • 2. Versions 2 ● Architecting for the Cloud: AWS Best Practices - (Feb 2016) ○ 比較官腔的寫法 ● Architecting for the Cloud: AWS Best Practices - (Jan 2011) ○ 比較有人性的寫法
  • 4. Cloud Computing Difference 4 ● IT Assets Become Programmable Resources ● Global, Available, and Unlimited Capacity ● Higher Level Managed Services ● Security Built In
  • 5. 5
  • 7. ● Scalability ● Disposable Resources Instead of Fixed Servers ● Automation ● Loose Coupling ● Services, Not Servers ● Databases ● Removing Single Points of Failure ● Optimize for Cost ● Caching ● Security Design Principles 7
  • 8. ● Scaling Vertically ○ Scale-up, scale-down ○ c4.large → c4.xlarge → c4.2xlarge ○ CPU, Memory, IO ● Scaling Horizontally → Scale-out, Scale-in ○ Stateless Applications ○ Stateless Components ○ Stateful Components ○ Distributed Processing ● Elasticity is one of the fundamental properties of the cloud. ○ EC2, ELB, ECS, EBS, EIP, ENI, Scalability 8
  • 9. ● Push mode: distribute a workload is through the use of a load balancing solution ○ ELB routes incoming application request across multiple EC2 instances ● Pull mode: async event-driven workloads do not require a load balancing solution. ○ tasks that need to be performed or data that need to be processed could be stored as messages in a queue using Amazon Simple Queue Service (Amazon SQS) or as a streaming data solution like Amazon Kinesis. Stateless Applications 9
  • 10. 10Architecting for the Cloud: AWS Best Practices - (Jan 2011)
  • 11. 11
  • 12. ● Instantiating Compute Resources ○ Bootstrapping → EC2 Userdata ○ Golden Images or Containerize ○ Hybrid ● Infrastructure as Code Disposable Resources Instead of Fixed Servers 12 06. Resource Provisioning and DevOps
  • 13. Hardware (c4.xlarge) Operating System Language Integreter Application Server Tools Code Build an Environment Amazon Machine Image (AMI) instances create-image run-instances 13
  • 14. *.lab1.abc.com *.lab2.abc.com *.lab3.abc.com Infra as Code: CloudFormation / Terraform Route 53 Workers / API / Batch ELB: BBB-lab-abc-com DNS: BBB.labN.abc.com db.lab.abc.com (RDS) 14 ELB: AAA-lab-abc-com DNS: AAA.labN.abc.com ELB: BBB-lab-abc-com DNS: BBB.labN.abc.com AutoScalingGroup CloudFormation - Infra CloudFormation - Cloud Services awsops gfs.lab.abc.com (GlusterFS)
  • 15. 15
  • 16. ● Elastic Beanstalk: PaaS ● EC2 Auto recovery ● Auto Scaling ● CloudWatch Alarms ● CloudWatch Events ● OpsWorks Lifecycle events ● Lambda Scheduled events Automation 16
  • 17. Auto Scaling ● 前提:Resource Provisioning - 環境建置自動化 ● 白話文: 機器 (零件) 隨時能被置換 能砍掉重練 17
  • 18. ● Well-Defined Interfaces ● Service Discovery ● Asynchronous Integration ○ decouple your components ● Graceful Failure, design for failure and nothing will fail ○ Route53 policy Loose Coupling (鬆耦合) 18
  • 19. Well-defined Interfaces ● 清楚 Input / Output ○ 資料結構 ○ 資料型態 ○ 清楚的錯誤定義 19
  • 20. Decouple Your Components 20Architecting for the Cloud: AWS Best Practices - (Jan 2011)
  • 21. Design for failure 21 SRE: Site Reliability Engineering CH13 Emergency Response Things break; that’s life.
  • 22. ● Managed Services ○ SQS, CloudWatch, ELB, S3, EBS RDS, SES ... ● Serverless Architectures ○ Lambda, API Gateway ○ Whitepaper: Serverless Architectures with AWS Lambda (November 2017) Services, Not Servers 22
  • 23. 以下摘錄自『可口可樂的 Serverless 之旅』 ● IT 人員花太多時間在解決網路問題、找尋故障排除方法等吃力不討好,又無法彰顯 IT價值的事務。 ● IT 團隊將一半以上的時間浪費在對企業毫無價 值的問題。不僅企業質疑IT團隊的貢獻度,就連 IT人自 身的生活品質也大受影響 ,而這幾乎是每個企業都面臨的現象。 ● 系統維運還包含更新修補檔、監控系統等工作。例如一早上班發現一臺機器必須更新 18個套件的安全 更新檔,對開發者來 說可是沈重的負擔。 ● DevOps要能成功,關鍵在於 IT架構的可程式化與自動化,也就是 Infrastructure as Code。即使企業 已經採用雲端虛擬機器服務,但系統管理若仍透過網頁介面手動設定與調整,這樣的管理方法勢必無 法擴張,發揮不了DevOps的效果。 Serverless Source: https://www.ithome.com.tw/news/112431 23
  • 24. Servers AAHHHHHH!!! Ref: Getting Started with Serverless Architectures
  • 25. OS Patch Instance Size Service Capacity Cost and Budget OS Version User Permission OS Utilization Performance OS Optimize Package for Services Config Management Hardware Failuare 25 Operation Tasks for Servers
  • 26. 26
  • 27. ● Relational Databases ● NoSQL Databases ● Data Warehouse (Big Data) ● Search Design Principles - Database 27 ● Scalability ● High Availability ● Anti-Patterns
  • 28. ● Introducing Redundancy ○ standby or active mode ○ when a resource fails, functionality is recovered on a 2nd resource using a process call failover ● Detect Failure ○ Route53 Health Check ○ EC2 auto recovery ○ Auto Scaling Removing Single Points of Failure (SPOF) 28
  • 29. Removing Single Points of Failure (SPOF) 29 ● Durable Data Storage ○ Maintain a variety of data ○ ync replication -> RAID1, RAID5, GFS (GlusterFS) ○ Durability: No replacement for backups ○ DR: RPO, RTO ● Automated Multi-Data Center Resilience ○ MultiAZ, VPC AZs ○ ELB AZ, DynamoDB, RDS ○ Region Levels ● Fault Isolation and Traditional Horizontal Scaling ○ Shuffle Sharding
  • 30. Reference 1. Site Reliability Engineering a. Chapter 22 - Addressing Cascading Failures b. Chapter 23 - Managing Critical State: Distributed Consensus for Reliability 2. 高品質微服務 a. 第五章 容錯與災難預防 3. AWS Whitepapers a. AWS Well-Architected Framework - Reliability Pillar (December 2017) b. Building Fault-Tolerant Applications on AWS (October 2011) 30
  • 31. 31
  • 32. ● Right Sizing ● Elasticity ● Take Advantage of the Variety of Purchasing Options ○ Reserved Capacity ○ Spot Instances Optimize for Cost 32
  • 33. 33Architecting for the Cloud: AWS Best Practices - (Jan 2011)
  • 34. ● Utilize AWS Features for Defense in Depth ● Offload Security Responsibility to AWS ● Reduce Privileged Access ● Security as Code ● Real-Time Auditing Security 34
  • 35. 35
  • 37. 37 What is Software Architecture?
  • 39. 39
  • 40. 40 Reference ● Architecting for the Cloud (Feb, 2016) (PDF) ● Architecting on The Cloud (slideshare) ● Building Microservices ● Clean Architecture ● Site Reliability Engineering
  • 41. 41
  • 42. 42