Reducing Connect time for static files

etrader nginx-forum at
Thu Nov 10 11:12:54 UTC 2011

Exploring the webpage load by pingdom service, I just found that the
main delay of page load is due to slow load of images. The images come
from a cookieless domain. I changed the nginx conf for that domain as

	location ~*

proxy_redirect			off;
proxy_set_header		Host $host;
proxy_set_header		X-Real-IP $remote_addr;
proxy_set_header		X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size		10m;
client_body_buffer_size	128k;
proxy_connect_timeout	90;
proxy_send_timeout		90;
proxy_read_timeout		90;
proxy_buffer_size		4k;
proxy_buffers			4 32k;
proxy_busy_buffers_size	64k;
proxy_temp_file_write_size	64k;
		access_log		off;

It did speed up the load of images a lot; but still, the load of images
is not fast enough

Connect: 100 ms
Send: 1 ms
Wait 200 ms
Receive: 100 ms

Receive is controlled by the data transfer, but I believe it is possible
to reduce the length of connect and wait time by nginx configuration.
Any idea?

Posted at Nginx Forum:,218159,218159#msg-218159

More information about the nginx mailing list