atom feed2 messages in ru.sysoev.nginxNginx cache is slow
FromSent OnAttachments
ddarkoAug 19, 2011 12:57 am 
Maxim DouninAug 19, 2011 1:32 am 
Subject:Nginx cache is slow
From:ddarko (ngin@nginx.us)
Date:Aug 19, 2011 12:57:27 am
List:ru.sysoev.nginx

Nginx 1.1.0

location / { uwsgi_cache tna; uwsgi_cache_use_stale error timeout http_500; uwsgi_cache_valid any 10m; uwsgi_cache_key $request_uri;

include /etc/nginx/params_uwsgi; uwsgi_intercept_errors off; uwsgi_pass unix:/tmp/uwsgi-tna.sock; }

I made a simple test: $ ab -c 10 -n 10000 http://.... on localhost. I am sure that the request is sent to uWSGI only once and is then cached. result: Requests per second: 3712.93 [#/sec] (mean)

Meanwhile, on the same machine and the same nginx for static file reaches the result: Requests per second: 4826.62 [#/sec] (mean)

How is that static files are faster to 30%! from the cache based on static files ?

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