Welcome! Log In Create A New Profile

Advanced

How to reduce the latency overheads of Nginx as load balancer

bj
August 09, 2010 03:51PM
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;
}
}
}
Subject Author Posted

How to reduce the latency overheads of Nginx as load balancer

bj August 09, 2010 03:51PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 63
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready