title: How to avoid having idle connection timeout while uploading large file?
body: <p>Consider our current architecture:</p>
  
  <pre><code>         +---------------+                             
           |    Clients    |                             
           |    (API)      |                             
           +-------+-------+                             
                   ∧                                     
                   ∨                                     
           +-------+-------+    +-----------------------+
           | Load Balancer |    |   Nginx               |
           | (AWS - ELB)   +&lt;--&gt;+   (Service Routing)   |
           +---------------+    +-----------------------+
                                            ∧            
                                            ∨            
                                +-----------------------+
                                |   Nginx               |
                                |   (Backend layer)     |
                                +-----------+-----------+
                                            ∧            
                                            ∨            
           -----------------    +-----------+-----------+
             File Storage       |       Gunicorn        |
             (AWS - S3)     &lt;--&gt;+       (Django)        |
           -----------------    +-----------------------+
  </code></pre>
  
  <p>When a client, mobile or web, try to upload large files (more than a GB) on our servers then often face idle connection timeouts. Either from their client library, on iOS for example, or from our load balancer. </p>
  
  <p>When the file is actually being uploaded by the client, no timeouts occurs because the connection isn't "idle", bytes are being transferred. But I think when the file has been transferred into the Nginx backend layer and Django starts uploading the file to S3, the connection between the client and our server becomes idle until the upload is completed. </p>
  
  <p>Is there a way to prevent this from happening and on which layer should I tackle this issue ?</p>