Testing Network load balancer

0 votes
I'm trying to understand the working of Network Load Balancer. I've created two instances both of them has a web page deployed on them. Now I've created a load balancer and registered these two instances in my target group. I use the load balancer's DNS name and paste it on google as a url.

I get only the first instance's web page. Is my load balancer not working? Or is there some other issue?
May 16, 2019 in AWS by Tushar
1,494 views

2 answers to this question.

0 votes

You'll need to perform your test using more than one client computer. ELB will keep sending requests to the same EC2 instance that originate from the same remote IP. Meaning, if you keep refreshing your browser on the same computer, it won't jump between EC2 instances. You need to try on another computer to get a different EC2 instance

answered May 16, 2019 by Mihir

I dont believe this happens, can you give us a link in the documentation that shows it?

I believe that its using round robin methods to select instance:

https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html

Routing Algorithm

With Application Load Balancers, the load balancer node that receives the request evaluates the listener rules in priority order to determine which rule to apply, and then selects a target from the target group for the rule action using the round robin routing algorithm. Routing is performed independently for each target group, even when a target is registered with multiple target groups.

With Network Load Balancers, the load balancer node that receives the connection selects a target from the target group for the default rule using a flow hash algorithm, based on the protocol, source IP address, source port, destination IP address, destination port, and TCP sequence number. The TCP connections from a client have different source ports and sequence numbers, and can be routed to different targets. Each individual TCP connection is routed to a single target for the life of the connection.

With Classic Load Balancers, the load balancer node that receives the request selects a registered instance using the round robin routing algorithm for TCP listeners and the least outstanding requests routing algorithm for HTTP and HTTPS listeners.

0 votes

Checked the security group rules to be the same for both instances? 
Also, instances should be in different availability zones and don't forget to set the proper subnets into step 2 of load balancer configuration page. 
Lastly, make sure that the subnet of the second web server is public, so check your nacls

answered May 17, 2019 by Aris

Related Questions In AWS

0 votes
1 answer

How do I create a network load balancer?

Follow these steps to create a load ...READ MORE

answered May 14, 2019 in AWS by Rakshi
669 views
0 votes
1 answer

Configure target group while creating Network Load balancer

Follow these steps: For Target group, keep the ...READ MORE

answered May 14, 2019 in AWS by Rakshi
499 views
0 votes
1 answer

Different availability zones for network load balancer

Yes, you can use multiple availability zones ...READ MORE

answered May 15, 2019 in AWS by Renold
1,502 views
0 votes
1 answer

How do I test my load balancer?

To check the web load balancer, you ...READ MORE

answered May 16, 2019 in AWS by Kiara
1,514 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Will Network Load Balancer have static IP?

Each NLB provides a single IP for ...READ MORE

answered May 14, 2019 in AWS by Rakshi
1,566 views
0 votes
2 answers

Register targets with target group - Network Load Balancer

Yes you can register to target group ...READ MORE

answered May 14, 2019 in AWS by Aishwarya
5,167 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP