How to reduce the latency overheads of Nginx as load balancer
bj
nginx-forum at nginx.us
Mon Aug 9 23:51:13 MSD 2010
Hello,
I am using Nginx as my load balancer to Apache backend servers. It works
great.
But I experienced a significant latency overhead Nginx load balancer
added under heavy loaded traffics. I noticed that the response time
increased from 1.5 sec to 3.0 sec, when compared with the case that no
Nginx is used.
Do you have any suggestions on how I should configure Nginx to reduce
such latency overheads?
My Nginx configuration is attached below for your info.
Thanks,
Chang
==========================================
My Nginx configuration file
==========================================
worker_rlimit_nofile 65536;
worker_processes 4;
events {
worker_connections 8182;
use epoll;
}
http {
server_names_hash_bucket_size 64;
include /usr/local/nginx/conf/mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
tcp_nodelay on;
fastcgi_read_timeout 180;
gzip on;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_types text/plain;
upstream backend_10_1{
server 192.168.2.110:80; server 192.168.2.111:80; server
192.168.2.112:80;
}
server {
server_name default;
listen 10.20.131.14;
error_log /dev/null crit;
access_log off;
rewrite_log off;
location / {
proxy_pass http://backend_10_1;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
}
}
}
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,117965,117965#msg-117965
More information about the nginx
mailing list