0
0
AWScloud~30 mins

Cross-zone load balancing in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
Enable Cross-Zone Load Balancing on an AWS Application Load Balancer
📖 Scenario: You are managing a web application hosted on AWS. To improve availability and distribute traffic evenly, you use an Application Load Balancer (ALB) across multiple Availability Zones.By default, the ALB routes traffic to targets in the same zone as the request. To optimize traffic distribution, you want to enable cross-zone load balancing.
🎯 Goal: Configure an AWS Application Load Balancer to enable cross-zone load balancing using AWS CLI commands.
📋 What You'll Learn
Create an Application Load Balancer named my-alb in two Availability Zones
Create a target group named my-target-group
Register two targets with the target group
Enable cross-zone load balancing on the Application Load Balancer
💡 Why This Matters
🌍 Real World
Cross-zone load balancing helps distribute incoming traffic evenly across multiple Availability Zones, improving application availability and fault tolerance.
💼 Career
Cloud architects and DevOps engineers often configure load balancers with cross-zone load balancing to optimize resource utilization and ensure high availability.
Progress0 / 4 steps
1
Create the Application Load Balancer
Use the AWS CLI command to create an Application Load Balancer named my-alb in the subnets subnet-123abc and subnet-456def. Include the security group sg-789xyz, specify the type as application, and specify the scheme as internet-facing.
AWS
Need a hint?

Use the aws elbv2 create-load-balancer command with the required parameters.

2
Create the Target Group
Create a target group named my-target-group for instances using the protocol HTTP and port 80. Use the VPC ID vpc-abc123.
AWS
Need a hint?

Use the aws elbv2 create-target-group command with the required parameters.

3
Register Targets with the Target Group
Register two instance targets with IDs i-0123456789abcdef0 and i-0fedcba9876543210 to the target group named my-target-group on port 80.
AWS
Need a hint?

Use the aws elbv2 register-targets command with the target group ARN and target instance IDs.

4
Enable Cross-Zone Load Balancing
Enable cross-zone load balancing on the Application Load Balancer named my-alb by modifying its attributes using the AWS CLI.
AWS
Need a hint?

Use the aws elbv2 modify-load-balancer-attributes command with the correct attribute key and value.