NetworkingSection 108 min read7 questions

Global Infrastructure

Route 53, CloudFront & Global Apps

AWS Global Infrastructure ประกอบด้วย Regions, Availability Zones, และ Edge Locations ทั่วโลก ช่วยให้สร้าง global applications ที่ latency ต่ำ ทนทานต่อ disaster และป้องกัน attack ได้ บทนี้ครอบคลุม Route 53 (DNS), CloudFront (CDN), S3 Transfer Acceleration, Global Accelerator, Outposts, WaveLength และ Local Zones

ในหน้านี้10 sections
  1. 01Global AWS Infrastructure
  2. 02Why Build Global Applications
  3. 03Amazon Route 53
  4. 04Amazon CloudFront
  5. 05S3 Transfer Acceleration
  6. 06AWS Global Accelerator
  7. 07AWS Outposts
  8. 08AWS WaveLength
  9. 09AWS Local Zones
  10. 10Summary
01

Global AWS Infrastructure

AWS Global Infrastructure คือโครงสร้างพื้นฐานทางกายภาพของ AWS ที่กระจายอยู่ทั่วโลก ออกแบบมาให้ทั้ง availability สูง, latency ต่ำ และ scalable

AWS Regions

พื้นที่ทางภูมิศาสตร์สำหรับ deploy applications + infrastructure (เช่น us-east-1, ap-southeast-1) แต่ละ region แยกอิสระจากกัน — เลือก region ตาม compliance, latency, ค่าใช้จ่าย และ services ที่มี

Availability Zones (AZ)

Region หนึ่งประกอบด้วยหลาย AZs (โดยทั่วไป 3 AZs) แต่ละ AZ คือ data center หนึ่งแห่งหรือกลุ่ม data centers ที่แยกอิสระทางกายภาพ ใช้สำหรับ high availability — กระจาย workload ข้าม AZs

Edge Locations / Points of Presence

จุดที่กระจาย content ใกล้ผู้ใช้ — ใช้กับ CloudFront, Global Accelerator, Route 53 มี 400+ แห่งทั่วโลก ครอบคลุม 90+ เมือง — ช่วยลด latency โดยไม่ต้องไปถึง region

02

Why Build Global Applications

การสร้าง global application มีประโยชน์หลายอย่างที่ทำให้ AWS เป็นที่นิยม:

  • Decreased latency — ผู้ใช้ทั่วโลกได้ response เร็วขึ้น เพราะ content/service อยู่ใกล้ตัว
  • Disaster Recovery (DR) — ถ้า region หนึ่งล่ม ยังมีอีก region รองรับ workload ต่อได้
  • Attack protection — กระจาย traffic หลายจุดทำให้ DDoS attack สำเร็จยาก ใช้ร่วมกับ Shield, WAF ได้

AWS Global Apps Services คือกลุ่มบริการหลักที่ออกแบบมาเพื่อสร้าง global apps:

Route 53

Managed DNS service — กระจาย traffic ไปยัง region/endpoint ที่เหมาะสมด้วย routing policies (latency, geolocation, failover)

CloudFront

Content Delivery Network (CDN) — cache content ที่ edge locations ใกล้ user ลด latency การ download/read

S3 Transfer Acceleration

เร่งการ upload ไฟล์เข้า S3 ผ่าน edge location → AWS backbone network เร็วกว่าผ่าน internet ปกติ

Global Accelerator

ใช้ AWS internal global network proxy ไปยัง region — ปรับปรุง performance ของ TCP/UDP apps ได้ static IPs ด้วย

03

Amazon Route 53

Amazon Route 53 คือ managed DNS service ของ AWS ชื่อ 53 มาจาก port 53 ที่ DNS ใช้งาน — เป็น highly available, scalable และเป็น service เดียวของ AWS ที่มี 100% Availability SLA

  • A Record — ชี้ hostname ไป IPv4 address
  • AAAA Record — ชี้ hostname ไป IPv6 address
  • CNAME — ชี้ hostname ไป hostname อื่น (ไม่สามารถใช้กับ root domain เช่น example.com)
  • Alias — เฉพาะ Route 53 — ชี้ hostname ไป AWS resource (ELB, CloudFront, S3, RDS) ใช้กับ root domain ได้และฟรี!

Routing Policies — กำหนดวิธีที่ Route 53 ตอบ DNS queries:

Simple

ชี้ไป resource เดียว (หรือหลาย values → client เลือก random) ไม่มี health check — ง่ายที่สุด

Weighted

กระจาย traffic ตาม weight ที่กำหนด — เช่น 70% ไป A, 30% ไป B เหมาะกับ canary deployment / A/B testing

Latency-based

Route ไป region ที่มี network latency ต่ำสุดสำหรับ user — เหมาะกับ global app ที่ deploy หลาย region ต้องการให้ user ทุกคนเร็วที่สุด

Failover

Active-Passive setup — ปกติไป primary, ถ้า health check fail จะ failover ไป secondary อัตโนมัติ ต้องใช้คู่กับ Health Checks

Geolocation

Route ตาม location ของ user (ประเทศ/ทวีป) — เหมาะกับ content localization, restrict distribution ตามกฎหมาย

Multi-Value Answer

คืน multiple values (สูงสุด 8) พร้อม health check แต่ละตัว — ไม่ใช่ ELB replacement แต่เป็น client-side load balancing แบบง่าย

Geoproximity

Route ตามระยะห่างทางภูมิศาสตร์ของ user กับ resource สามารถปรับ bias เพื่อขยาย/หดพื้นที่ที่ route ไป region ใด region หนึ่งได้

Health Checks — Route 53 ตรวจสอบ health ของ endpoints อัตโนมัติ ใช้คู่กับ Failover routing เพื่อ route traffic ไปเฉพาะ healthy endpoints

  • ตรวจสอบ endpoint โดยตรง (HTTP, HTTPS, TCP) จาก health checkers ทั่วโลก
  • ตรวจสอบ CloudWatch Alarm — ใช้กับ private resources
  • Calculated health checks — รวมหลาย checks ด้วย AND/OR/NOT

Domain Registration — Route 53 ทำหน้าที่เป็น Domain Registrar ด้วย จดทะเบียน domain ใหม่ได้ตรงจาก AWS console รองรับหลาย TLD (.com, .net, .org, .io ฯลฯ) จัดการ DNS records ได้ที่เดียว

04

Amazon CloudFront

Amazon CloudFront คือ Content Delivery Network (CDN) ปรับปรุง read performance โดย cache content ที่ edge มี 216+ Points of Presence ทั่วโลก พร้อม DDoS protection ในตัว (integrate กับ Shield + WAF)

  • ปรับปรุง read performance — content cache ที่ edge ใกล้ user
  • DDoS protection ในตัวด้วย AWS Shield Standard (ฟรี) — ใช้คู่กับ AWS WAF สำหรับ Layer 7
  • รองรับ HTTPS ทั้ง viewer↔Edge และ Edge↔Origin (ใช้ ACM cert ฟรี)
  • Geo Restriction — allow/block users จาก country ที่กำหนด

CloudFront Origins — แหล่งของ content ที่ CloudFront ไปดึงมา cache:

S3 Bucket

สำหรับ static files (images, CSS, JS, video) ใช้ร่วมกับ OAI (Origin Access Identity) หรือใหม่กว่าคือ OAC (Origin Access Control) เพื่อบังคับให้ access ผ่าน CloudFront เท่านั้น ไม่ให้ bypass ไป S3 ตรงๆ

Custom Origin (HTTP)

HTTP backend ใดๆ ก็ได้ — ALB, EC2 (public), S3 website endpoint, on-prem server, หรือ HTTP server นอก AWS ขอแค่เข้าถึงผ่าน HTTP/HTTPS ได้

CloudFront vs S3 Cross-Region Replication (CRR) — สองวิธีในการกระจาย content แต่ใช้ scenario ต่างกัน:

CloudFront

Global edge network — file ถูก cache ที่ edge locations ทั่วโลกตาม TTL เหมาะกับ static content ที่ต้อง available ทุกที่ ไม่ต้อง setup ทีละ region — auto cover ทั่วโลก

S3 CRR

ต้อง setup replication per region (source → destination bucket) update แบบ near real-time, files เป็น read-only ในการ replicate เหมาะกับ dynamic content ที่ต้องการ low-latency ใน few specific regions

05

S3 Transfer Acceleration

S3 Transfer Acceleration เร่งการ upload/download ไฟล์เข้า/ออก S3 โดย route ผ่าน edge location ที่ใกล้ user ที่สุด แล้วส่งต่อไปยัง S3 region ผ่าน AWS backbone network

  • User → ส่ง file ไปยัง edge location ที่ใกล้สุด (public internet สั้นๆ)
  • Edge location → forward ผ่าน AWS internal backbone network ที่เร็วและ stable ไปยัง S3 bucket region
  • เป็นการ enable feature บน S3 bucket เดิม — ไม่ต้องสร้าง bucket ใหม่ ไม่เปลี่ยน URL
  • เหมาะกับการ upload ไฟล์ขนาดใหญ่ข้าม region ทั่วโลก
06

AWS Global Accelerator

AWS Global Accelerator ปรับปรุง availability + performance ของ global apps โดยใช้ AWS global internal network (ปรับปรุงได้ถึง 60%) แทน public internet

  • สร้าง 2 Anycast IPs ให้ application — IPs เดียวที่ใช้ทั่วโลก (deterministic, ไม่เปลี่ยน)
  • Traffic จาก user → ไปยัง edge location ที่ใกล้ที่สุด (Anycast routing)
  • Edge location → forward ผ่าน AWS private network ไปยัง application ใน region ที่กำหนด
  • รองรับ failover ระหว่าง regions แบบ deterministic (ภายในวินาที)
  • เหมาะกับ TCP / UDP applications, gaming, IoT, voice/video

Global Accelerator vs CloudFront — ทั้งคู่ใช้ AWS global network และ edge locations + รองรับ Shield ป้องกัน DDoS แต่ใช้คนละ scenario:

CloudFront

Caches content ที่ edge locations — content ถูก serve จาก edge เลย (cache hit) เหมาะกับ static content (images, videos, web assets) และ dynamic content ที่ cache ได้ — content delivery + acceleration

Global Accelerator

ไม่ caches content — แค่ proxy packets ที่ edge แล้วส่งต่อไปยัง app ใน region ผ่าน AWS network ปรับปรุง performance ของ TCP/UDP เหมาะกับ HTTP apps ที่ต้องการ static IPs หรือ deterministic regional failover

07

AWS Outposts

AWS Outposts คือ hybrid cloud — AWS infrastructure + services + APIs + tools ส่งมอบมาในรูปแบบ rack ติดตั้งใน data center ของลูกค้า (on-premises) AWS เป็นคนติดตั้งและดูแล hardware นั้นๆ ให้

  • AWS setup + manage Outposts Racks ภายใน DC ของลูกค้า
  • ลูกค้าใช้ AWS services เดิม (EC2, EBS, S3, RDS, ECS) ได้บน on-prem hardware
  • ลูกค้ารับผิดชอบ physical security ของ rack

ประโยชน์ของ Outposts:

Low-latency access on-prem

Application ที่ on-prem ติดต่อกับ AWS services ที่ on-prem ด้วย latency ต่ำมาก (ms ระดับเดียว)

Local data processing

ประมวลผลข้อมูลใน DC ของตัวเอง ไม่ต้องส่งทุก byte ไป cloud — ประหยัด bandwidth

Data residency

ข้อมูลอยู่ในประเทศ/DC ของลูกค้าตามกฎหมาย compliance (เช่น healthcare, financial)

Easier migration

ใช้ AWS APIs/tools เดียวกัน on-prem และ cloud — ย้าย workload ไปมาง่าย

Fully managed by AWS

AWS update, monitor, replace hardware ให้ — ไม่ต้องจัดการ infrastructure เอง

08

AWS WaveLength

AWS WaveLength คือการนำ AWS infrastructure ไปติดตั้ง embedded ใน 5G telco network ที่ edge ของผู้ให้บริการเครือข่าย — สำหรับ application ที่ต้องการ ultra-low latency

  • นำ AWS services (EC2, EBS, VPC) ไปอยู่ที่ 5G edge
  • Traffic จาก mobile user → ไม่ต้องออกจาก Communication Service Provider's network → เข้าถึง app ได้ตรงๆ ที่ edge
  • Ultra-low latency (single-digit ms) สำหรับ mobile apps

Use cases:

  • Smart cities — IoT sensors, traffic management แบบ real-time
  • ML diagnostics — medical imaging แบบ on-the-go
  • Connected vehicles — autonomous driving, V2X communication
  • AR / VR — immersive experiences ที่ต้องการ latency ต่ำมาก
  • Real-time multiplayer gaming บน mobile
09

AWS Local Zones

AWS Local Zones นำ AWS services (เลือกบาง services) ไปติดตั้งใกล้ end users ใน เมืองที่มีประชากรหนาแน่น เช่น Los Angeles, Houston, Miami, Boston

  • เป็นส่วนขยายของ AWS Region แม่ — เชื่อมกับ region ปกติด้วย AWS network ที่เร็ว
  • ให้ single-digit millisecond latency สำหรับ users ในพื้นที่นั้น
  • ใช้ services ที่เลือกได้ เช่น EC2, EBS, FSx, ELB, RDS, ECS, EKS

Use cases:

  • Real-time gaming — latency ต่ำสุดสำหรับผู้เล่นในเมือง
  • Live video streaming + processing
  • Machine Learning inference ที่ต้องการ response เร็ว
  • AR / VR experiences
  • Media + entertainment workflows ที่ต้องการ low-latency
10

Summary

สรุปบริการในกลุ่ม Global Infrastructure — ใช้บริการไหนสำหรับ scenario แบบไหน:

Route 53

Global DNS — แปลง domain → IP/resource มี routing policies หลายแบบ (latency, geolocation, failover) + health checks ใช้ทำ smart routing สำหรับ global app

CloudFront

CDN / Cache at edge — cache static + dynamic content ที่ edge ลด latency การอ่าน เหมาะกับ web/media content delivery ทั่วโลก

S3 Transfer Acceleration

เร่ง S3 uploads — route ผ่าน edge → AWS backbone ไปยัง S3 region เหมาะกับ upload ไฟล์ใหญ่ข้าม region

Global Accelerator

AWS network proxy — ไม่ cache แต่ใช้ AWS internal network + Anycast IPs ปรับปรุง performance ของ TCP/UDP apps พร้อม static IPs

AWS Outposts

AWS on-premises — AWS rack ใน DC ของลูกค้า ใช้ AWS services on-prem ด้วย low-latency เหมาะกับ data residency / hybrid cloud

AWS WaveLength

5G edge — AWS embedded ใน 5G telco network ultra-low latency สำหรับ mobile apps (AR/VR, gaming, connected vehicles)

AWS Local Zones

ใกล้เมืองใหญ่ — AWS services ในเมืองที่มีประชากรหนาแน่น single-digit ms latency สำหรับ gaming, ML inference, video processing

  • Regions + AZs + Edge Locations — โครงสร้างหลัก 3 ระดับของ AWS Global Infrastructure
  • Route 53 เป็น service เดียวของ AWS ที่มี 100% Availability SLA
  • CloudFront vs Global Accelerator — CloudFront cache content ที่ edge ส่วน Global Accelerator ไม่ cache แค่ proxy ผ่าน AWS network
  • Outposts / WaveLength / Local Zones — extend AWS ออกนอก region ไปยัง on-prem / 5G / เมืองใหญ่
ทดสอบ

คำถามทบทวน

7 ข้อ — เลือกคำตอบเพื่อดูเฉลยและคำอธิบาย

ข้อ 1 / 7คะแนน 0

Application deploy อยู่ใน 4 regions ทั่วโลก ต้องการให้ users แต่ละทวีปได้ response เร็วที่สุดโดย route ไป region ที่มี network latency ต่ำสุด ควรใช้ Route 53 Routing Policy ใด?