First time subscriber here, as I am new to using nginx. My question is about latency/performance issue as compared to our previously configured Apache server. Our web application is running on Apache + PHP-FPM, and we are planning on publishing a new site which contains only static files "published" from within the web application on a set interval. Thinking of saving the overhead of apache and php, I've setup nginx-light package on ubuntu and configured the server with minimal changes from default. Just to see what kind of improvement we have, I compared avg response times for the same static _javascript_ file and noticed a difference, but the opposite of what I expected: ~128ms from apache and ~142ms from nginx. I've also tested with php enabled on nginx and seen about the same results.
There must be something not right. I've looked at a lot performance tips, but no huge difference. The only minor help was switching to buffered logging, but the difference is probably close to the margin of error. Can anyone help?
Here are some environment specs: (dedicated server)
-Xeon 8-core cpu
-16GB RAM
-128gb SSD
-Ubuntu 16.04.3
-nginx-light package
Here are the modifications to nginx.conf:
http {
if_modified_since before;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
}
and under default site:
server {
etag off;
ssl_certificate ...
ssl_certificate_key ...
location /static/ {
try_files $uri =404;
add_header Cache-Control "public";
expires 6M;
gzip on;
gzip_types *;
}
}
Any and all help is much appreciated!
_______________________________________________ nginx mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx
