How to Configure Network Load Balancer (NLB) in AWS

To Configure Network Load Balancer On AWS

Introduction:

A Network Load Balancer works at the fourth layer of the Open Systems Interconnection (OSI) model that can regulate millions of requests per second. Once the load balancer gets a connection request, it selects a target from the target group for the default rule. It strives to open a TCP connection to the selected target on the port specified in the listener configuration.

Steps to Configure:

Login to your AWS Management Console I have already created all these instances on AMZAON Linux Machine now I am going to verify that all these instances are accessing from outside or it can be accessible by their public ip address For instance, of machine 3 For Machine2 For machine3 Now create the load balancer and choose Network load balancer form AWS management console Give name for NLB and configure it with basic default configuration Now check the availability zone of all the instances Now assign that availability zones in your load balancer

Now create target Group for instances Define name for that and do all the configuration for that Now include your instances in that target group Now check the status for that instances in target group now it would be unused state it will take some time to health check up of that instances. Now come back to your load balancer and select the target group what you have created now As final step, create the load balancer Now lets cross verify the Network load balancer with its all description Now copy the DNS name for the network load balancer and put it in browser Its not getting response because of, the instances in target group is still in unused state when all the heath file checkup completed it will come up. Now go and check again is instances in target group came up or not

Its now in initial state So after some time I have checked its now active So now after that I check the DNS name for the load balancer it got response from the instances. After checking again and again, I got response from different machine Because of load balancing mechanism of network load balancer it would shift the request coming to listener in the machine which have less load. With this method configuration of Network load balancer comes to an end.

Comment
revathins
Jun 15 2022
We have ecreated a load balancer with internet facing but we need a load balancer with internal facing. How can we change the load balancer from internet facing to internal facing.
Add a comment
FAQ
Q
Can I assign more than one EIP to my Network Load Balancer in each subnet?
A
For each associated subnet that a Network Load Balancer is in, the Network Load Balancer can only support a single public/internet facing IP address
Q
Can I create my Network Load Balancer in a single Availability Zone?
A
Yes, you can create your Network Load Balancer in a single availability zone by providing a single subnet when you create the load balancer.
Q
Can I use the AWS Management Console to set up my Network Load Balancer?
A
you can use the AWS Management Console, AWS CLI, or the API to set up a Network Load Balancer.
Q
What TCP ports can I use to load balancer?
A
You can perform load balancing for the following TCP ports: 1-65535
Q
Can I create a TCP (Layer 4) listener for my Network Load Balancer?
A
Yes. Network Load Balancers support only TCP (Layer 4) listeners.