AWS Load Balancer Does Not Work Properly

Asked 2 years ago, Updated 2 years ago, 449 views

Launching two EC2 instances.
These two started from the same AMI and have not changed anything since they started.
We created a load balancer with these two designated as target groups.
I thought accessing the DNS of the load balancer would send a request to either side, but it seems to be flying to both sides.

As a program
Accessing http:// DNS for Load Balancer /test
The private IP address of the instance is now registered with the dynamoDB.

After hitting http://[Load Balancer DNS]/test once from the browser, the nginx access log for each instance is as follows:

 [Instance returned to browser]
172.31.7.1-[30/Jan/2021:06:27:49+0000] "GET/test HTTP/1.1"200 1100"-"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36"

[The one who doesn't return to the browser]
172.31.7.1-[30/Jan/2021:06:27:49+0000] "GET/favicon.ico HTTP/1.1"2001104" http://[Load Balancer DNS]/test" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Apple WebKit/537.36 (KHTML, like Gecko) Chrome/88.0.432434/Saf367"

I would like to submit requests only to either instance.
Please let me know if anyone knows anything.

aws nginx amazon-elb

2022-09-30 21:54

1 Answers

I solved myself.
The cause was a request from favicon.ico.


2022-09-30 21:54

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.