Based on the SAP-C02 exam guideReport an error
Reflecting on Week 5's 5 days, one axis runs through: How to route global users to correct region/endpoint, auto or manually switch on failure, all within budget. DR strategies (Day 1), Route 53 7 routing types (Day 2), CloudFront advanced (Day 3), Global Accelerator, Route 53 Health Check/DNSSEC/Resolver (Day 4). These five layers learned independently but exam combines them into single scenarios.
Today isn't repetition. Compress each concept's decision tree, mathematically organize most-frequent trade-off comparison mistakes, finish with 12 complex enterprise scenarios.
Revisit DR strategy numbers. Understanding "why this number" matters beyond memorization.
| Strategy | RTO | RPO | Cost Ratio | Key Mechanism |
|---|---|---|---|---|
| Backup & Restore | Hours to days | Backup interval | ~5% | S3 snapshots, EC2+RDS provisioning on restore |
| Pilot Light | 30 min to 2 hours | Minutes | ~15-25% | DB replication always on, app servers wait in AMI |
| Warm Standby | Minutes to 30 min | Minutes | ~30-50% | Scaled-down full stack always running |
| Active-Active | ~0 | ~0 | ~100%+ | Both regions serve simultaneously |
Aurora Global Database positions between Pilot Light and Warm Standby as DR tool.
RPO: Aurora Global uses async replication, Replication Lag typically <1 second. Thus RPO ~1 second. Large write storms (e.g., batch inserts millions) can increase Lag to seconds/tens of seconds.
RTO: Managed Planned Failover vs Unplanned Failover differences exist.
promote-read-replica-db-cluster API or console. RTO typically a few minutes (DB promotion) + app reconnection.# Aurora Global Unplanned Failover: promote Secondary to new Primary
aws rds promote-read-replica-db-cluster \
--db-cluster-identifier secondary-cluster-ap-northeast-2 \
--region ap-northeast-2
# After promotion, change app connection string to Secondary cluster endpointReplication Lag Monitoring: Use AuroraGlobalDBReplicationLag CloudWatch metric as DR decision basis. Can condition R53 ARC Safety Rule: "Lag > 5 seconds, forbid failover."
💡 Related Theory: Aurora Global Database async replication based on WAL (Write-Ahead Logging). Aurora compatible PostgreSQL streams WAL segments to Secondary region. Streaming occurs directly at Aurora Storage Layer so overhead lower and Lag shorter than DB engine-level replication (MySQL binlog-based). Aurora Global Database's <1 second Lag superior to general RDS Cross-Region Read Replica (seconds/tens of seconds).
Auto failover fast but risky. Real incident: "Auto failover while DB Replication Lag large loses 5 minutes data." R53 ARC prevents via manual switch + SafetyRule.
R53 ARC SafetyRule Example:
MUST_EXIST: After switch, minimum 1 cell must stay ACTIVE
→ prevent complete traffic blackout
ASSERTION: Allow switch only when Aurora Lag < 3 seconds
→ control data loss threshold
SafetyRule two types: Gating Control + Assertion Control:
📚 Case Study: Amazon internal systems origin. 2019 Amazon Shopping Cart service auto-failover caused Secondary data inconsistency. After, Amazon adopted "human confirms DB Lag, switch manually when safe" principle, becoming R53 ARC design philosophy. ARC product of "automation isn't always correct" lesson.
Final organization of two most-confused services.
Selection Algorithm:
1. UDP protocol?
YES → AGA (CloudFront doesn't support UDP)
2. Need 2 static IPs? (firewall whitelist, BYOIP)
YES → AGA
3. Caching critical? (static content, Cache Hit Rate > 50%)
YES → CloudFront
4. Need WAF / Signed URL / Signed Cookies / FLE / Lambda@Edge?
YES → CloudFront
5. Need immediate failover bypassing DNS cache?
YES → AGA (bypass Route 53 DNS cache, packet-level switch)
6. Basic HTTP API, no caching/static IP needed?
→ Route 53 LBR cheapest
Cost Comparison (100GB traffic/month):
Small traffic makes AGA $18 fixed cost burden, but static IP + packet-level switch requirement leaves no choice.
🔍 Deeper Dive: CloudFront + AGA combo pattern. When both static IP (AGA Anycast) + HTTP caching (CloudFront) needed, place AGA frontend forwarding to CloudFront Origin. Whitelist AGA IP at corporate firewall, CloudFront handles WAF/caching/Lambda@Edge. Hybrid SaaS pattern needing both "static IP enterprise customers + public CDN."
| Health Check Type | Suitable Scenario | Constraint |
|---|---|---|
| Endpoint (HTTP/S/TCP) | Poll public endpoints directly | Can't reach private resources |
| CloudWatch Alarm integration | Private resources, complex metrics | CW Alarm design needed |
| Calculated HC | Overall multi-tier app status | Child HC design complexity |
Failover routing: Primary Health Check becoming Unhealthy switches all queries to Secondary. Must guarantee "Secondary also Healthy." Attach Health Check to Secondary too; if Secondary Unhealthy, Route 53 won't switch and returns Primary (lesser evil).
⚠️ Pitfall Lesson: If Route 53 feels slow to switch due to DNS cache, sum Health Check detection time (default 30-second interval, 3 consecutive failures = 90 seconds) + DNS TTL. Default adds up to 90 + 300 = 390 seconds (6.5 minutes). Fast switching needs Health Check interval 10 seconds (Fast) and TTL ≤60 seconds.
DR and global architecture cost optimization belongs SAP domain 4 (continuous improvement).
Compute Savings Plans vs EC2 Instance Savings Plans:
| Item | Compute Savings Plans | EC2 Instance Savings Plans |
|---|---|---|
| Commitment | 1 or 3 years | 1 or 3 years |
| Discount | up to 66% (vs On-Demand) | up to 72% |
| Flexibility | EC2 + Fargate + Lambda | EC2 specific Family only |
| Region change | Possible | Impossible (region-locked) |
| Instance family change | Possible | Impossible |
| DR scenario fitness | Applies even after region switch | May not apply if DR region different |
DR environments risking region changes = Compute Savings Plans safer. Switching us-east-1 to us-west-2 on failover still applies Compute Savings Plans.
Cost Calculation Example:
Current: m5.xlarge On-Demand 10 × $0.192/hour × 720 hours = $1,382/month
Compute Savings Plans 1 year:
30% discount → $0.134/hour
Savings: $1,382 - ($0.134 × 10 × 720) = $1,382 - $965 = $417/month saved
Compute Savings Plans 3 years:
50% discount → $0.096/hour
Savings: $1,382 - ($0.096 × 10 × 720) = $1,382 - $691 = $691/month saved
💡 Related Theory: Savings Plans structure similar to finance Futures Contracts. Commit future computing use at fixed price, receive discount. Spot Instance opposite: "cheaply buy spare capacity at spot market." Optimal cost combining both — Savings Plans cover base load, Spot handles bursts.
| Pillar | Global Architecture Checkpoint | Key Services |
|---|---|---|
| Operational Excellence | Automate DR Runbook, periodic failover drills | R53 ARC, SSM Runbook |
| Security | CloudFront + WAF, DNSSEC, OAC, FLE | WAF, Shield, KMS |
| Reliability | Multi-Region, Health Check, Calculated HC | Route 53, AGA, Aurora Global |
| Performance Efficiency | CloudFront cache hit rate, AGA backbone | CloudFront, Global Accelerator |
| Cost Optimization | Savings Plans, Reserved, CloudFront vs AGA choice | Cost Explorer, Savings Plans |
| Sustainability | Operate only necessary regions, clean unused resources | Trusted Advisor, Compute Optimizer |
🔍 Deeper Dive: 2022 AWS Well-Architected adds 6th Pillar "Sustainability." SAP-C02 explicitly addresses this. Global architecture sustainability optimization core: "don't operate more regions than needed." If Active-Active exceeds RTO/RPO requirements, reducing to Warm Standby lowers resource usage and aligns with sustainability.
RTO > 4 hours, RPO > 1 hour?
YES → Backup & Restore (cheapest)
RTO 30 min to 4 hours, RPO minutes?
"Only replicate DB, quick app start via AMI"
YES → Pilot Light
RTO minutes to 30 min?
"Full stack must always run at small scale"
YES → Warm Standby
RTO ~0, simultaneous serving?
YES → Active-Active (most expensive)
Route users to correct region?
Data sovereignty enforce → Geolocation
Performance optimize → Latency-Based Routing
Distance + traffic adjust → Geoproximity (Traffic Flow)
DR Primary/Secondary → Failover
Endpoint acceleration needed additionally?
HTTP + cache + WAF → CloudFront
UDP / static IP / DNS-bypass failover → AGA
Both → AGA frontend + CloudFront backend
Failover within region?
HTTP error-based instant retry → CloudFront Origin Failover
Health Check-based region switch → Route 53 / AGA
Manual safe switch → R53 ARC Routing Control
Click a choice to reveal the answer and explanation.
Question 1
Global fintech company operates Aurora Global Database us-east-1 (Primary) and ap-northeast-2 (Secondary). Must limit data loss to 5 seconds on failure. Operations team monitoring DB Replication Lag wants block auto-failover if Lag spikes. Most suitable configuration?
Question 2
E-commerce wants European users in eu-west-1, Asian users in ap-northeast-2. When both healthy, each region serves its users; if one fails, other handles all. Route 53 configuration?
Question 3
Media company operates HLS streaming via CloudFront. Paid subscribers only, needing authentication for hundreds of .ts segments after login. Most efficient CloudFront access control?
Question 4
Global game operates UDP-based multiplayer server; B2B partners must whitelist server IP in firewalls. Simultaneously protect from attacks. Most suitable?
Question 5
Financial firm executes Aurora Global Database Managed Planned Failover (Primary: us-east-1 → Secondary: ap-northeast-2). ap-northeast-2 new Primary. Data loss occurred?
Question 6
SaaS runs 100 EC2 in us-east-1 On-Demand. Stable traffic, 1-year same-scale forecast. No instance family change. Max cost savings option?
Question 7
Difference between CloudFront Origin Failover and Route 53 Failover?
Question 8
Company expands ap-northeast-2 service to eu-west-1. European users prefer Europe over Seoul; eu-west-1 failure fallbacks to ap-northeast-2. DNS cache delay unacceptable. Optimal configuration?
Question 9
Company applied Field-Level Encryption (FLE) to CloudFront. Credit card field must not decrypt at CloudFront edge. Who decrypts?
Question 10
Enterprise Well-Architected Review identifies "Operational Excellence: DR failover runbook not documented nor automated." Most suitable AWS service automating failover Runbook?
Question 11
Startup provides global SaaS. Cost paramount; currently single-region (us-east-1) 99.9% SLA. RTO 4 hours, RPO 1 hour required. Cheapest DR strategy satisfying requirements?
Question 12
Company enabled DNSSEC on Route 53 Hosted Zone. After, some users get SERVFAIL response. Cause and solution?