</>Học Dev
Bài học

Tuần 2 - Ngày 1: AWS Well-Architected Framework Overview

Tuần 2 – Ngày 1

Tuần 2 - Ngày 1: AWS Well-Architected Framework Overview

Mục tiêu học tập

  • Hiểu tổng quan về Well-Architected Framework
  • Nắm được 6 pillars và mối quan hệ giữa chúng
  • Biết cách sử dụng Well-Architected Tool

1. Giới thiệu Well-Architected Framework

Định nghĩa

Well-Architected Framework là tập hợp các best practices và design principles giúp:

  • Đánh giá và cải thiện kiến trúc cloud
  • Hiểu trade-offs trong các quyết định thiết kế
  • Xây dựng secure, high-performing, resilient, efficient systems

Lịch sử phát triển

2015 (Oct): Ra mắt với 4 pillars
            (Security, Reliability, Performance Efficiency, Cost Optimization)
2016 (Nov): Thêm Operational Excellence pillar (→ 5 pillars)
2021 (Dec): Thêm Sustainability pillar (→ 6 pillars hiện tại)

2. Sáu Pillars của Well-Architected

WELL-ARCHITECTEDFRAMEWORKOperationalSecurityReliabilityPerformanceCostExcellenceEfficiencyOptimizeSustainability

Tổng quan 6 Pillars

PillarFocusKey Question
Operational ExcellenceChạy và monitor systems"Làm sao để vận hành hiệu quả?"
SecurityBảo vệ data và systems"Làm sao để bảo mật?"
ReliabilityPhục hồi từ failures"Làm sao để đảm bảo uptime?"
Performance EfficiencySử dụng resources hiệu quả"Làm sao để đạt hiệu suất?"
Cost OptimizationTránh chi phí không cần thiết"Làm sao để tiết kiệm?"
SustainabilityGiảm environmental impact"Làm sao để bền vững?"

3. Design Principles chung

1. Stop guessing capacity needs

Trưc:Sau:PeakLoadAutoScaleWasted$$ProvisionUsewhatforpeakyouneed

2. Test systems at production scale

  • Có thể tạo production-scale test environment
  • Chỉ trả tiền khi test
  • Terminate sau khi test xong

3. Automate to make experimentation easier

  • Infrastructure as Code
  • Automated testing
  • CI/CD pipelines

4. Allow for evolutionary architectures

  • Thiết kế cho thay đổi
  • Loose coupling
  • Modular components

5. Drive architectures using data

  • Collect metrics
  • Make data-driven decisions
  • Continuous improvement

6. Improve through game days

  • Simulate production events
  • Test incident response
  • Build confidence

4. Trade-offs giữa các Pillars

Security vs Performance

MoreSecurityLayers=HigherLatencyWAFALBEC2RDS+2ms+1ms+1ms+1msTotal:+5msTrade-off:Chpnhnlatencycaohơnđcósecuritytthơn

Cost vs Reliability

Higher Availability = Higher Cost

99.9% (3 nines):    Single AZ deployment      $
99.99% (4 nines):   Multi-AZ deployment       $$
99.999% (5 nines):  Multi-Region deployment   $$$

Trade-off: Xác định acceptable downtime vs budget

Performance vs Cost

On-Demand Capacity:
- Instant performance scaling
- Pay premium for flexibility

Reserved Capacity:
- Commit for discount
- May not scale as quickly

Trade-off: Flexibility vs cost savings

5. Well-Architected Tool

Cách sử dụng

  1. Định nghĩa workload trong AWS Console
  2. Trả lời câu hỏi cho mỗi pillar
  3. Review risks được xác định
  4. Tạo improvement plan
  5. Track progress theo thời gian

Workflow

DefineWorkloadAnswerQuestionsReviewRisksGenerateImprovementPlanTrackProgress

Output của Tool

  • High Risk Issues (HRIs)
  • Medium Risk Issues (MRIs)
  • Improvement plan với priorities
  • PDF report để share

6. Well-Architected Lenses

Standard Lenses

  • Serverless Lens
  • SaaS Lens
  • Container Build Lens
  • Data Analytics Lens
  • Machine Learning Lens
  • IoT Lens
  • Financial Services Lens
  • Healthcare Lens
  • Games Industry Lens

Custom Lenses

  • Tạo lenses riêng cho tổ chức
  • Thêm questions và best practices specific
  • Share across accounts

7. Câu hỏi trong kỳ thi

Dạng câu hỏi thường gặp

  1. Xác định pillar: "Scenario này liên quan đến pillar nào?"
  2. Trade-off: "Giải pháp nào cân bằng tốt nhất giữa X và Y?"
  3. Best practice: "Áp dụng design principle nào?"

Ví dụ

Câu hỏi: Một công ty muốn giảm chi phí nhưng vẫn đảm bảo 99.99% availability. Giải pháp nào phù hợp?

Phân tích:

  • Cost Optimization: Tìm cách giảm chi phí
  • Reliability: Vẫn cần high availability
  • Trade-off: Dùng Reserved Instances cho baseline, Spot cho burst

8. Câu hỏi ôn tập

  1. Well-Architected Framework có bao nhiêu pillars?

    Xem đáp án

    6 pillars: Operational Excellence, Security, Reliability, Performance Efficiency, Cost Optimization, và Sustainability (thêm năm 2021). Mỗi pillar có design principles, best practices, và questions trong Well-Architected Tool. SAP-C02 hỏi về cả 6 pillars — Sustainability là pillar mới nhất, focus on environmental impact.

  2. Pillar nào được thêm vào năm 2021?

    Xem đáp án

    Sustainability pillar — focus on environmental impacts: minimize energy consumption, increase efficiency, reduce carbon footprint. Gồm các best practices như: chọn Region với renewable energy, right-sizing resources, dùng managed services, serverless để giảm idle capacity, optimize code để giảm CPU/memory usage. Dù ít câu hỏi nhất trong SAP nhưng cần biết principles.

  3. "Stop guessing capacity needs" áp dụng cho pillar nào?

    Xem đáp án

    Performance Efficiency pillar. Thay vì over-provision "just in case", dùng Auto Scaling và serverless để scale đúng theo demand — không đoán capacity. Cloud cho phép scale up/down dynamically, test với different resource configurations, experiment với new technologies mà không over-commit. Khái niệm này cũng liên quan đến Cost Optimization (không trả cho capacity không dùng).

  4. Well-Architected Tool được sử dụng để làm gì?

    Xem đáp án

    Evaluate workloads theo AWS best practices qua questionnaire (~60+ câu hỏi theo pillar). Tool generate report với: HRI (High Risk Items), MRI (Medium Risk Items), improvement plan với actions cụ thể. Có thể lưu milestones (trước/sau improvements), share với AWS Solutions Architects cho review, và tích hợp với Trusted Advisor. Miễn phí trong AWS Console.

  5. Kể tên 3 specialized lenses.

    Xem đáp án

    Có nhiều lenses, ví dụ phổ biến: Serverless Application Lens (Lambda, API GW, DynamoDB patterns), Machine Learning Lens (ML workload best practices), SaaS Lens (multi-tenant architectures), IoT Lens, HPC Lens, Data Analytics Lens, Financial Services Lens. Lenses bổ sung additional best practices cho specific domains trên foundation của 6 core pillars.

9. Bài tập thực hành

  • Truy cập Well-Architected Tool trong AWS Console
  • Đọc Well-Architected Framework Whitepaper
  • Xem qua một Lens (ví dụ: Serverless Lens)

Tài liệu tham khảo chính thức


Ngày tiếp theo: Operational Excellence Pillar