Module 3: Global Infrastructure and Reliability

學習目標

  • AWS Global Infrastructure 優點
  • Availability Zones 基本概念
  • Amazon CloudFront & edge locations 優點
  • 比較 AWS 服務的不同配置方法

AWS Global Infrastructure 優點

High Availability and Fault Tolerance

若要理解 AWS 全球基礎設施的運作方式,可以用咖啡店來做比喻。如果某個地點發生了遊行、洪水或停電等事件,顧客仍然可以去幾個街區外的另一家店喝咖啡。


AWS Regions

每個 AWS Region 由多個孤立且物理上分離的 Availability Zones 組成,這些 Availability Zones 位於同一地理區域內。

A Region is a geographically isolated area that contains AWS resources.

Regions contain Availability Zones.


選擇 Region 的四個重要商業考量:
  1. Compliance
    • Compliance with data governance and legal requirements
  2. Proximity to your customers 
    • How close you are to your customer base?
    • Latency: The time it takes for data to be sent and received
  3. Feature availability (Available services within a Region)
    • Sometimes the closest Region may not have all the AWS features you want.
    • e.g. Amazon Braket: Quantum computing platform
  4. Pricing
    • Expensive e.g. Brazil (high tax)


AZ (Availability Zone) ➡ Region 內的單一資料中心 or 一組數據中心

每個 AZ 由一個或多個獨立的數據中心所組成,這些數據中心具備冗餘的電源、網絡和連接,且彼此相距數十英里(miles)、low latency 資料傳輸

當你啟動一個 Amazon EC2 instance,它會在 Availability Zone 中安裝的實體機器上啟動一台虛擬機。


Best Practice for AZ - Building a resilient and highly available architecture

"Run across at least two Availability Zones in a Region."

  • Regionally scoped service: 
    • ELB (Elastic Load Balancing)
      • ELB runs across all AZs, communicating with the EC2 instances that are running in a specific AZ.
    • Amazon SQS (Amazon Simple Queue Service)
    • Amazon SNS (Amazon Simple Notification Service)
  • Regional services are by definition already highly available at no additional cost of effort on your part.

If us-west-1a were to fail, you would lose your instance. 😱


Amazon EC2 instances in multiple Availability Zones
If us-west-1a were to fail, your application would still be running in us-west-1b.👍

Edge locations

An edge location is a site that Amazon CloudFront uses to store cached copies of your content closer to your customers for faster delivery.

An edge location is a data center that an AWS service uses to perform service-specific operations.

  • CDNs (Content Delivery Networks) ➡ Amazon CloudFront
  • DNS (Domain Name Service) ➡ Amazon Route53

AWS Outposts

AWS Outposts is a service that you can use to run AWS infrastructure, services, and tools in your own on-premises data center in a hybrid approach.

Extend AWS infrastructure and services to different locations, including your on-premises data center.


How to Provision AWS Resources

  • API: Application Programming Interface

Interacting with AWS services

  1. AWS Management Console (browser-based)
    • Test environments
    • View AWS bills
    • View monitoring
    • Work with non-technical resources
  2. AWS Command Line Interface (CLI)
    • Make API calls using the terminal on your machine
  3. AWS Software Development Kits (SDKs)
    • Interact with AWS resources through various programming languages (C++, Java, .NET, and more)
  4. Various other tools
    • AWS CloudFormation
    • AWS Elastic Beanstalk

(1) AWS CloudFormation

  • Infrastructure as code tool used to define a wide variety of AWS resources 
  • Once you define your resources in a CloudFormation template, CloudFormation will parse the template and begin provisioning all the resources you defined in parallel. 
  • It determines the right operations to perform when managing your stack and rolls back changes automatically if it detects errors.
In a declarative way using JSON or YAML text-based documents 
(CloudFormation template)

CloudFormation supports many different AWS resources from storage, databases, analytics, machine learning, and more. CloudFormation manages all the calls to the backend AWS APIs for you.

You can run the same CloudFormation template in multiple accounts or multiple regions, and it will create identical environments across them.

(2) AWS Elastic Beanstalk

  • Helps you to focus on your business application, not the infrastructure
  • Elastic Beanstalk deploys the resources necessary to perform the following tasks:
    • Adjust capacity
    • Load balancing
    • Automatic scaling
    • Application health monitoring

Require: Application code & desired configurations

Helps you provision Amazon EC2-based environments


留言

這個網誌中的熱門文章

Module 2: Compute in the Cloud --- part 1

Module 2: Compute in the Cloud --- part 2

考前加強:雲端重要概念