Amazon Web Services (AWS) offers an application load balancing (ALB) solution that divides incoming application traffic among several targets, including IP addresses, containers, and Amazon EC2 instances, within one or more availability zones. It may route traffic based on sophisticated criteria including HTTP headers, cookies, and request methods because it runs at the OSI model’s application layer (Layer 7).
Setting Up a Target Group
Targets that are the intended destination for traffic from a load balancer are logically grouped together as target groups. In order to direct incoming requests to one or more targets according to defined rules, load balancers—such as the Application Load Balancer (ALB) or Network Load Balancer (NLB)—work in tandem with target groups.
- Access the Amazon EC2 console via https://console.aws.amazon.com/ec2/.
- Navigate to the Target Groups section.
- Initiate the creation of a new target group.
- In the Basic configuration segment:
- Choose the target type (Instances or IP addresses).
- Provide a descriptive Target Group name.
- Adjust the Port and Protocol settings as required.
- If applicable, designate IPv4 or IPv6 as the IP address type.
- Select the appropriate VPC.
- Specify the Protocol version.
- Customize the Health checks parameters as necessary.
- Optionally, apply tags if needed.
- Create target group
Registering Targets
Within the Register targets page:
- For Instances, select relevant EC2 instances and define ports.
- For IP addresses, input the IP addresses along with associated ports.
- For Lambda functions, either choose functions or input their ARNs.
- Confirm inclusion by selecting “Include as pending” for each target.
Configuring a Load Balancer and Listener
- Open the Amazon EC2 console through https://console.aws.amazon.com/ec2/.
- Navigate to Load Balancers.
- Start creating a new Load Balancer.
- Under the Application Load Balancer section, choose to create a new one.
- In the Basic configuration:
- Enter a distinctive Load balancer name.
- Select the Scheme (Internet-facing or Internal).
- Choose the IP address type (IPv4 or Dualstack).
- Under Network mapping:
- Pick the appropriate VPC.
- Enable zones by selecting relevant subnets.
- Set up Security groups or create a new one.
- Optionally, generate a new security group by selecting “Create a new security group.”
- Configure Listeners and routing:
- Customize listeners and default actions (e.g., HTTP on port 80).
- Associate the target group you created.
- Optionally, add additional listeners.
- Complete the creation process for the load balancer.
Our Technical Team will be available to assist you with Setting up AWS application load balancer that can make your job a lot easier. Get in Touch with Skynats if you have any queries.