Debugging nginx Load Balancer

Arun Gupta lists at ruby-forum.com
Wed Apr 29 22:07:19 MSD 2009


> May be I misunderstood your question, but if you want to know upstream 
> port, you may add to
> access_log format variable $upstream_addr
> 
> http://wiki.nginx.org/NginxHttpUpstreamModule#.24upstream_addr
> http://wiki.nginx.org/NginxHttpLogModule
Ok, that took care of logging.

I created a cluster of 3 backend servers and the access.log now shows 
...

127.0.0.1 - [127.0.0.1:3002] - [29/Apr/2009:11:03:43 -0700] GET /runlogs 
HTTP/1.1 "200" 621 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 
10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 
Safari/525.27.1" "-"
127.0.0.1 - [127.0.0.1:3000] - [29/Apr/2009:11:03:43 -0700] GET 
/stylesheets/scaffold.css?1240977992 HTTP/1.1 "200" 889 
"http://localhost/runlogs" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 
10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 
Safari/525.27.1" "-"
127.0.0.1 - [127.0.0.1:3001] - [29/Apr/2009:11:03:43 -0700] GET 
/favicon.ico HTTP/1.1 "200" 0 "http://localhost/runlogs" "Mozilla/5.0 
(Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 
(KHTML, like Gecko) Version/3.2.1 Safari/525.27.1" "-"

The port is shown as the second parameter in each log line, that's good! 
But I expected the request to be served by only one instance, why all 3 
?

-Arun

-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list