strange flow increase when using nginx as a proxy

medialy nginx-forum at nginx.us
Tue May 8 09:09:37 UTC 2012


os:centos 5.5 64bit(as a router)
nginx:1.2.0

request----->[ nic_in----->nginx----->nic_out ]----->backend_server

STRANGE FLOW INCREASE:
request->linux:5Mbps linux->backend_server:5Mbps
linux->request:90Mbps backend_server->linux:60Mbps

iptables is used to redirect data to nginx, such as:
/sbin/iptables -t nat -A PREROUTING -i nic_in -p tcp --dport 80 -j
REDIRECT --to-ports 8888

nginx.conf:
worker_rlimit_nofile 65535;
events
{
use epoll;
worker_connections 65535;
}

http
{
charset off;
override_charset off;
proxy_buffering off;
resolver 8.8.4.4;
proxy_buffer_size 64k;
proxy_buffers 4 64k;
log_format main '[$time_local] $remote_addr $host "$request" $status
$body_bytes_sent "$http_referer" ';
server
{
listen 8888;
location /
{
proxy_set_header Host $host;
#proxy_set_header Accept-Encoding "";
proxy_pass http://$http_host$request_uri;
}
}
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,226167,226167#msg-226167



More information about the nginx mailing list