# האם כדאי להעלות לאחסון מקומי ב-threads חדשים

**URL:** https://meta.discourse.org/t/is-that-a-good-option-to-make-upload-to-local-storage-in-new-threads/297643
**Category:** Development
**Created:** [3 במרץ,‏ 2024,‏ 1:16am UTC](https://meta.discourse.org/t/is-that-a-good-option-to-make-upload-to-local-storage-in-new-threads/297643 "2024-03-03T01:16:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rkt](https://avatars.discourse-cdn.com/v4/letter/r/3da27b/32.png) [@rkt](https://meta.discourse.org/u/rkt)
#### Post date: [3 במרץ,‏ 2024,‏ 1:16am UTC](https://meta.discourse.org/t/is-that-a-good-option-to-make-upload-to-local-storage-in-new-threads/297643/1 "2024-03-03T01:16:43Z")

</div>

Hi, I just find that the local storage function for uploads are implemented in the same thread of the Rails server, will that block the Rails server if too many uploads at the same time, so I just want to know if it is better to implement the local storage disk IO functions in a new threads? Or it is good with the current implementation?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [4 במרץ,‏ 2024,‏ 6:01am UTC](https://meta.discourse.org/t/is-that-a-good-option-to-make-upload-to-local-storage-in-new-threads/297643/2 "2024-03-04T06:01:12Z")

</div>

Uploads are implemented in multiple ways.

S3 uploads go direct to S3  
NGINX fronted uploads use SENDFILE which means rails gets the entire file to work with

We also shuffle stuff to background threads as needed using hijack and defer.

We are always open to improving things if you want to try a PR and there is a particular issue you are battling with.
