Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


   


   


   















      :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Nginx - upload


  • To: <nginx-ru@xxxxxxxxx>
  • Subject: Nginx - upload
  • From: "Alexander Sobcanyuk" <sasa@xxxxxxxxxxx>
  • Date: Fri, 17 Jun 2011 11:17:39 +0400
  • Content-language: ru
  • Organization: Algosoft.ru
  • Thread-index: AcwsT+MJe/FM/vKPTu2/yQ7QGgIlngAbgLNA

 

     

   upload      nginx   
apache
(  ,    ,   FreeBSD 7.1 & 7.2)

1.   :

 sendfile on;
 keepalive_timeout 65;
 gzip on;

 server {
client_max_body_size 100m;

 root /*/htdocs;
 index index.php index.html index.htm;

 location / {
 try_files $uri @back;
  }

 location @back {
 proxy_pass http://192.168.0.1:8000;
 proxy_set_header X-Host $host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Request-Uri $request_uri;

 }
 }


       80Mb   
.
,    Chrome  ~20 ,   IE6-8,
Opera, FF     

ɚ  apache (ښ *:8000)   ~10  
 

2.    upload:


location /upload {
 # Pass altered request body to this location
 upload_pass @back;
# gzip off;
# client_body_in_file_only clean;
# client_body_temp_path /*/tmp;
# directio 4m;
# sendfile on;
# client_body_buffer_size 128k;
# upload_buffer_size 128k;
# keepalive_timeout 0;
# tcp_nopush on;
# tcp_nodelay on;

 # Store files to this location
 upload_store /*/tmp;

 # Set specified fields in request body
 upload_set_form_field $upload_field_name.name "$upload_file_name";
 upload_set_form_field $upload_field_name.content_type
"$upload_content_type";
 upload_set_form_field $upload_field_name.path "$upload_tmp_path";

 # Inform backend about hash and size of a file
 upload_aggregate_form_field "$upload_field_name.size"
"$upload_file_size";

 # Pass matching fields from client to backend
 upload_pass_form_field "^uarea|action|action2|id|do|sb$";
 upload_limit_rate 0;

 upload_cleanup 400-505;
 }

   Chrome  ~12-15 ,    
- .
 FF  Opera  -   ~1Mb/s   
  ~150kb/s. 
 ,       - ,  
     25Mb  40 
 IE6        ~150kb/s. 
  ~1Mb/s     2-3Mb/s    
40-50. 

ɚ  Ӛ  (win2000, XP, Vista, win2008server)
   .
  2-   ( , Ś 
FreeBSD  nginx)
 ךlocation /upload  ,    - 
    (.  ).  
    ,  ,     .

   :
CPU: 1.3% user, 0.0% nice, 2.3% system, 1.5% interrupt, 94.9% idle

 ,      apache  , 
     


    ?



_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.