在整个网页资源加载过程中,nginx延迟会变得更糟吗?

如果我打开Chrome devtools并进入networking面板,然后做我的网站ctrl + F5,我每次注意到一个模式。

第一个请求,到一个PHP页面,有一个74毫秒的等待时间(等待)。 ping我的服务器需要35ms,所以我非常高兴,发现和服务的PHP页面的开销只有40毫秒左右。

但是随着页面加载资源,大部分需要200ms。 静态jpegs / css / js等

这是“正常的”,如果是这样的话是什么原因呢?

如果我直接浏览一个图像(所以我只加载一个JPEG而没有其他),那么这个请求的延迟往往是在60-70ms的范围内。

我通过SPDY服务该网站,但禁用这似乎没有任何区别

这是我的nginx.conf文件:

pid /var/run/nginx.pid; user nginx nginx; worker_processes 6; error_log /var/log/nginx/error.log; events { use epoll; worker_connections 1024; } http { server_tokens off; client_max_body_size 50m; ssl_session_cache shared:SSL:10m; ssl_session_timeout 20m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; ssl_prefer_server_ciphers on; ssl_certificate /etc/pki/tls/certs/ssl-bundle.crt; ssl_certificate_key /etc/pki/tls/private/STAR_mydomain_com.key; ssl_stapling on; ssl_stapling_verify on; ssl_dhparam /etc/ssl/certs/dhparam.pem; charset utf-8; source_charset utf-8; include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$https $remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent $bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; keepalive_timeout 75s; keepalive_requests 100; open_file_cache max=100; etag off; gzip on; gzip_http_version 1.1; gzip_comp_level 1; gzip_static on; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype; index index.php index.html; fastcgi_read_timeout 600s; include /etc/nginx/sites-enabled/*.conf; include /etc/nginx/conf.d/*.conf; } 

nginx版本:

 nginx version: nginx/1.6.2 built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) TLS SNI support enabled configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_spdy_module --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 

Devtools瀑布:

定时器瀑布