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

Tuần 7 - Ngày 1: High Availability Architectures

Tuần 7 – Ngày 1

Tuần 7 - Ngày 1: High Availability Architectures

1. HA Design Principles

HAPRINCIPLES1.EliminateSinglePointsofFailure-Multi-AZdeployments-Redundantcomponents2.DesignforFailure-Assumecomponentswillfail-Implementhealthchecks-Auto-healingmechanisms3.LooseCoupling-Usequeuesbetweencomponents-Asyncwherepossible4.StatelessApplications-Storestateexternally-Easyhorizontalscaling

2. Multi-AZ Architecture

MULTI-AZWEBAPPRoute53(DNS)ALB(Multi-AZ)AZ-aAZ-bAZ-cEC2EC2EC2RDSMulti-AZorAurora

3. Auto Scaling Strategies

SCALING POLICIES:

1. Target Tracking (Recommended)
   - Maintain CPU at 50%
   - Simple configuration

2. Step Scaling
   - Multiple thresholds
   - Different actions per step

3. Scheduled Scaling
   - Known traffic patterns
   - Time-based

4. Predictive Scaling
   - ML-based prediction
   - Proactive scaling

COOLDOWN PERIODS:
- Default: 300 seconds
- Prevents rapid scale in/out
- Can customize per policy

4. Session Management

STATELESSPATTERN:UserALBAnyEC2instanceElastiCache(Redis)SessionStoreBenefits:-Instancecanfail-Scalein/outfreely-Nostickysessionsneeded

5. Database HA Patterns

RDS:Multi-AZ(syncreplication,autofailover)ReadReplicas(async,manualpromotion)CombinationofbothAurora:6copiesacross3AZsWriter+upto15readersAutofailover<30secondsGlobalDatabaseforcross-regionDynamoDB:Multi-AZbydefaultGlobalTablesformulti-region

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


Ngày tiếp theo: Disaster Recovery Strategies