サービス · Networking and Content Delivery · CLF-C02 の発展
Elastic Load Balancing
How an Application Load Balancer decides: listeners, rules, target groups, health checks and the settings the exam asks about.
このレッスンはまだ翻訳されていないため、英語で表示しています。
クラウドプラクティショナーで学んだこと
- A load balancer is the single entry point that spreads requests over many targets.
- It sends traffic only to healthy targets and scales by itself.
- Application Load Balancer: web traffic. Network Load Balancer: TCP and UDP at huge volume with static IPs. Gateway Load Balancer: third-party appliances.
Cross-zone balancing
- Default
- On for ALB, off for NLB
- Use it for
- Even spread across AZs
Deregistration delay
- Default
- 300 seconds
- Use it for
- Finish in-flight requests
Idle timeout
- Default
- 60 seconds
- Use it for
- Raise it for long requests
Sticky sessions
- Default
- Off
- Use it for
- Keep a user on one target
Health check
- Default
- Set per target group
- Use it for
- Remove failed targets
| Setting | Default | Use it for |
|---|---|---|
| Cross-zone balancing | On for ALB, off for NLB | Even spread across AZs |
| Deregistration delay | 300 seconds | Finish in-flight requests |
| Idle timeout | 60 seconds | Raise it for long requests |
| Sticky sessions | Off | Keep a user on one target |
| Health check | Set per target group | Remove failed targets |
1 / 2
Cross-zone balancing
- Default
- On for ALB, off for NLB
- Use it for
- Even spread across AZs
Deregistration delay
- Default
- 300 seconds
- Use it for
- Finish in-flight requests
Idle timeout
- Default
- 60 seconds
- Use it for
- Raise it for long requests
| Setting | Default | Use it for |
|---|---|---|
| Cross-zone balancing | On for ALB, off for NLB | Even spread across AZs |
| Deregistration delay | 300 seconds | Finish in-flight requests |
| Idle timeout | 60 seconds | Raise it for long requests |
2 / 2
Sticky sessions
- Default
- Off
- Use it for
- Keep a user on one target
Health check
- Default
- Set per target group
- Use it for
- Remove failed targets
| Setting | Default | Use it for |
|---|---|---|
| Sticky sessions | Off | Keep a user on one target |
| Health check | Set per target group | Remove failed targets |
概要
An Application Load Balancer (ALB) works at layer 7 (HTTP, HTTPS, gRPC) and supports WebSocket. A listener waits for requests on a port. Its rules look at the path, host name, HTTP header, query string or source IP, and then forward to a target group, redirect, return a fixed response, or authenticate the user with Amazon Cognito or an OpenID Connect (OIDC) identity provider. A target group holds the targets: EC2 instances, IP addresses (including on premises over a VPN or Direct Connect), or a Lambda function.
概要
Health checks mark each target healthy or unhealthy. Cross-zone load balancing is on by default for an ALB, so every target gets an equal share even when AZs hold different numbers of targets. For a Network Load Balancer it is off by default, and turning it on adds charges for data between AZs. Deregistration delay (300 seconds by default) lets in-flight requests finish before a target is removed. Sticky sessions send a user to the same target with a cookie, but they unbalance the load and hide a stateful design. Put TLS on the load balancer with an AWS Certificate Manager certificate to take encryption work off the servers.
概要
The Classic Load Balancer is the previous-generation type, and AWS recommends moving to a current one: new designs use an ALB, NLB or GWLB.
覚えること
- Listener rules route by path, host, header, query string or source IP.
- Targets: instances, IP addresses, Lambda functions. One ALB can serve many target groups.
- Health checks decide who gets traffic. Use at least two AZs, with targets in each.
- Cross-zone: on for an ALB by default, off for an NLB by default.
覚えること
- Deregistration delay: 300 seconds by default, so in-flight requests finish.
- Sticky sessions pin a user to one target. Prefer a stateless design.
試験では
- “Send /api to one fleet and /images to another” points to ALB path-based rules with two target groups.
- “Offload TLS decryption from the servers” points to an HTTPS listener with an ACM certificate.
- “Authenticate users with a corporate identity provider before they reach the app” points to ALB authentication (OIDC or Cognito).
- “Static IP addresses, extreme volume, TCP” points to a Network Load Balancer, not an ALB.
混同しやすいもの
Network Load Balancer and Gateway Load BalancerNetwork Load Balancer for fast layer 4 traffic and static IPs. Gateway Load Balancer for security appliances.
AWS Auto ScalingPick the scaling policy and metric, set warm-up, and know warm pools, lifecycle hooks and launch templates.
Amazon Route 53Pick the routing policy that matches the clue, alias records, the three kinds of health check, and private DNS.
ほかのタスクにも登場
このタスクの内容 · 2.1
- Microservices and stateless design
- Multi-tier architectures
- Event-driven and loose coupling patterns
- Serverless application patterns
- AWS Amplify and AWS Device Farm
- Horizontal vs vertical scaling
- Caching strategies
Load Balancing
API Gateway
- When and how to containerize
SQS
SNS
EventBridge
Step Functions
MQ
Secrets Manager
- Choosing purpose-built services
- Choosing object, file or block
Lambda
- Read replicas
ElastiCache
CloudFront
Global Accelerator
Transfer Family
S3
EFS
EBS
Fargate
ECS
EKS