Welcome! Log In Create A New Profile

Advanced

proxy_pass slows down my request/sec by half

Posted by imosquera 
proxy_pass slows down my request/sec by half
August 27, 2012 05:35PM
I'm currently using nginx to proxy back to gunicorn with 8 workers. I'm using an amazon extra large instance with 4 virtual cores. When I connect to gunicorn directly I get about 10K requests/sec. When I serve a static file from nginx I get about 25 requests/sec.

But when I place gunicorn behind nginx on the same physical server I get about 5K requests/sec. I understand there will be some latency from nginx, but I think there might be a problem since it's a 50% drops. Anybody heard of something similar? any help would be great!

Here is the relevant nginx conf:

worker_processes 4;
worker_rlimit_nofile 30000;

events {
worker_connections 5120;
}

http {

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;

}

##### sites-enabled/default:

upstream backend {
server 127.0.0.1:8000;
server 127.0.0.1:8001;
server 127.0.0.1:8002;
server 127.0.0.1:8003;
}

server {
server_name api.getsocialize.com *.api.getsocialize.com;

location / {
proxy_pass http://backend;
proxy_buffering off;
}
}



Edited 1 time(s). Last edit at 08/27/2012 05:36PM by imosquera.
Re: proxy_pass slows down my request/sec by half
August 29, 2012 11:12AM
I meant to say, "When I serve a static file from nginx I get about 25,000 requests/sec."
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 228
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready