# Upload scalability

**URL:** <https://www.ruby-forum.com/t/upload-scalability/205530>\
**Category:** NGINX\
**Created:** [April 8, 2011, 8:22am UTC](https://www.ruby-forum.com/t/upload-scalability/205530 "2011-04-08T08:22:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [April 8, 2011, 8:22am UTC](https://www.ruby-forum.com/t/upload-scalability/205530/1 "2011-04-08T08:22:00Z")

</div>

hi all,

```
        i am using upload module to post file to the server. how can

```

i improve scalability of the server to upload files . one server is  
running and receiving all uploded files . if i add three or four server  
on the backend .will it improve scalability?  
here is my configuration there is no need for backend server but if i  
add 3 or 4 backend server will it improve scalability?

i need good tuning to get more concurrency

worker\_processes 20;

error\_log logs/error.log notice;

working\_directory /usr/local/nginx;

events {  
worker\_connections 1024;  
}

http {  
include mime.types;  
default\_type application/octet-stream;

server {  
listen 80;  
client\_max\_body\_size 100m;

# Upload form should be submitted to this location

location /upload {

# Pass altered request body to this location

upload\_pass @test;

# Store files to this directory

# The directory is hashed, subdirectories 0 1 2 3 4 5 6 7 8 9 should

exist  
upload\_store /tmp 1;

# Allow uploaded files to be read only by user

upload\_store\_access user:r;

# 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}\_md5”  
$upload\_file\_md5;  
upload\_aggregate\_form\_field “${upload\_field\_name}\_size”  
$upload\_file\_size;

upload\_pass\_form\_field “^submit$|^description$”;  
}

# Pass altered request body to a backend

location @test {  
proxy\_pass [http://localhost:8080](http://localhost:8080);  
}  
}  
server{  
listen 8080;  
}  
}

Posted at Nginx Forum:

> **[upload scalability](https://forum.nginx.org/read.php?2,189350,189350#msg-189350)**
>
> hi all, i am using upload module to post file to the server. how can i improve scalability of the server to upload files . one server is running and receiving all uploded files . if i add three or four server on the backend .will it improve...
