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.