Load Balancing and Auto Scaling Quiz
Quiz
https://api.example.com/users. Which target group receives the request?Priority Condition Action
-----------------------------------------------
1 Path: /api/* → API-TG
10 Host: admin.* → Admin-TG
100 Header: X-User: admin → Admin-TG
Default (No match) → Default-TG/users doesn’t match /api/*, the host api.example.com doesn’t match admin.*, and there’s no X-User header. Since no rules match, the request goes to the Default-TG./users doesn’t match /api/*, the host api.example.com doesn’t match admin.*, and there’s no X-User header. Since no rules match, the request goes to the Default-TG.Health Check Settings:
├─ Protocol: _____
├─ Path: /health
├─ Interval: 30 seconds
├─ Timeout: 5 seconds
├─ Healthy threshold: 2
└─ Success codes: 200Target Tracking Scaling is an Auto Scaling policy that automatically adjusts capacity to maintain a specific metric at a target value.
Example: Keep average CPU utilization at 50%
How it works:
- If CPU exceeds 50%, ASG adds instances
- If CPU falls below 50%, ASG removes instances
- Continuously monitors and adjusts to maintain the target
Benefits: Easiest to configure, automatically calculates scaling adjustments, no need to define step scaling rules.
Did you get it right?
Step Scaling Policy:
• CPU 50-60%: Add 1 instance
• CPU 60-70%: Add 2 instances
• CPU >70%: Add 3 instances
Current State:
• CPU Utilization: 68%
• Current Instances: 5Application Load Balancer (ALB) - Layer 7
- Protocol: HTTP, HTTPS, gRPC
- Routing: Path, host, header, query string based
- Use case: Web apps, microservices, APIs
- Features: Content-based routing, WebSocket, HTTP/2
Network Load Balancer (NLB) - Layer 4
- Protocol: TCP, UDP, TLS
- Performance: Ultra-low latency (~100 μs), millions of req/sec
- Static IP: One per AZ, Elastic IP support
- Use case: Extreme performance, gaming, IoT, TCP/UDP apps
- Preserves client IP without X-Forwarded-For
Did you get it right?
Target Group Attributes:
├─ Deregistration delay: 300 seconds
├─ Stickiness: Enabled
├─ Load balancing algorithm: ___________
└─ Slow start mode: DisabledPredictive Scaling is an ML-based Auto Scaling feature that proactively scales capacity before demand increases.
How it works:
- Analyzes historical CloudWatch metric data
- Uses machine learning to forecast future traffic patterns
- Automatically scales capacity ahead of predicted demand
- Works alongside dynamic scaling policies
Best for: Applications with recurring patterns (daily, weekly traffic cycles)
Example: An online learning platform that sees traffic spike every weekday at 9 AM when classes start—Predictive Scaling can add capacity at 8:50 AM proactively.
Did you get it right?
Auto Scaling Group Configuration:
├─ Default cooldown: 300 seconds
├─ Scaling policy: Simple Scaling
└─ Action: Add 2 instances when CPU > 70%
Timeline:
T+0: CPU = 75%, scaling action triggered (Add 2)
T+1m: CPU = 80%, alarm triggers again
T+5m: Cooldown period ends