Comments (3)
Hi @NonlinearNimesh ,
As I understand you have a file upload endpoint with a large number of requests of files ~5Mb. Are those files processed in a backend service using celery workers? Or do you want to scale the upload?
Dask can be used as a computational engine similar to Celery, but while still maintaining a high degree of concurrency and not blocking needlessly. You can start a dask cluster with queuepool and consumerpool and connect to it using a dask async client in your routes. Take a look at this:
https://distributed.dask.org/en/stable/asynchronous.html
from daskqueue.
Thanks for the response @AmineDiro
- Are those files processed in a backend service using celery workers
==> Yes, we take the file and return to the front end that "file upload successfully" and then there are 8-9 task (which include DB operation, conversion, etc.) that is done in the backend. We are using 4 workers but I have seen that queue getting blocked the moment it receives a file over than a threshold (currently I don't know the exact number of file uploads). So i am guessing this is also a scaling problem. So to answer your 2nd Question, Yes we want to scale the upload also.
Also, one more problem that exists is let's say I gave a request of 500 files to upload and you have given 5 after me. So you have to wait till my 500 uploads are finished. This cant happen. Do you think scaling can solve this problem?
from daskqueue.
Ok I see, queues are used to offload some processing-heavy workload in the background and return a waiting result for the user. In my opinion, uploading files doesn't fit this pattern. You should block the user until the whole file is uploaded. You should just horizontally scale your uploading API and use multi-part upload with async capability. Hope this is useful 😸 !
from daskqueue.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from daskqueue.