I am having a issue with NGINX. I will be serving files to multiple (~4000) people and they might be downloading multiple files at the same time. I have setup nignx and tryed to download a test file (centos dvd 1 4GB) once I try to download the same file multiple times at the the same time it only allows me to download one first and then others sit and wait for me to finish the first download. How can I serve it without any waiting time.
NGINX.conf:
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
worker_rlimit_nofile 200000;
events {
worker_connections 10000;
multi_accept on;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_requests 1000;
open_file_cache max=1000;
# Added on 26.07.2013 to make files fly!
tcp_nopush on;
client_max_body_size 5G;
client_body_timeout 120;
client_header_timeout 120;
client_body_buffer_size 128K;
client_header_buffer_size 1k;
large_client_header_buffers 4 8k;
send_timeout 60;
reset_timedout_connection on;
types_hash_max_size 2048;
server_tokens off;
gzip on;
gzip_static on;
gzip_min_length 512;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
VIRTUAL SERVER CONF:
server {
listen 80;
server_name *.*.*.*;
root /usr/share/nginx/html;
error_log /var/log/nginx/deadz/error.log;
access_log /var/log/nginx/deadz/access.log;
index index.html index.htm index.php;
}
How could I optimize it to serve the same file multiple times to one connection.
If you need more information please ask me.
worker_processes
.