Welcome! Log In Create A New Profile

Advanced

nginx upstream call twice on local tomcat

Posted by reperion 
nginx upstream call twice on local tomcat
February 16, 2017 09:33PM
I'm using Nginx upsteam to 4 servers. This is my configuration.

update api_sever {
server server1:8080 weight=1;
server server2:8080 weight=1;
server server3:8080 weight=1;
server server4:8080 weight=1;
}
And I counting upstream_addr each server.

grep -c "10.111.1.1(server1 IP)") server.access.log

If I counting on server 1, sever1 upstream_addr count is double then other servers. when i counting on server 2 It's same result(server2 upstream_addr count is twice)

Why? someone help me!
Re: nginx upstream call twice on local tomcat
February 17, 2017 02:23AM
Without specifying a balance method such as 'hash'/'leastconn' a server which has the best response time is chosen more often then those who's response time are higher.

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: nginx upstream call twice on local tomcat
February 19, 2017 10:01PM
http://nginx.org/en/docs/http/load_balancing.html

In this document, round-robin is defaults.
Can I find other documents?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 72
Record Number of Users: 8 on December 15, 2016
Record Number of Guests: 386 on August 02, 2016
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready