Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add background job processor. #62

Open
papodaca opened this issue Jan 3, 2020 · 5 comments
Open

Add background job processor. #62

papodaca opened this issue Jan 3, 2020 · 5 comments

Comments

@papodaca
Copy link

papodaca commented Jan 3, 2020

If the intent of this application is to be scaleable, it isn't ideal to process all the uploaded files in the main web server process. After a few (100-1000 not sure) simultaneous uploads performance may suffer handling other requests.

I've found a few options for achieving this easily:

To achieve this the code in this async block would be moved to a background job.

@mayeaux
Copy link
Owner

mayeaux commented Jan 3, 2020

The current approach I have to this, and let me know your take, is that the app is kind of partitioned into different sections. Check the top of .env.settings.sample, you can see :

LIVESTREAM_APP=false
FILE_HOST=false
FRONTEND=true

Basically you can run the app just as a file host which receives uploads, and the frontend is decoupled and can run as a standalone app.

Is that what you were getting at?

@dmdboi
Copy link
Contributor

dmdboi commented Jan 5, 2020

This is something we should look at if we plan on scaling nodetube.live

@papodaca
Copy link
Author

papodaca commented Jan 7, 2020

@mayeaux Not sure I follow 100% of what you are saying. Does this FILE_HOST/FRONTEND flag have to do with that http path certain processes are responding to? If that is the case at larger scales this may be insufficient.
This isn't a feature I require or anything just an architecture suggestion that I thought might be helpful.

@mayeaux
Copy link
Owner

mayeaux commented Jan 9, 2020

@papodaca Yup, you can see it here: https://github.com/mayeaux/nodetube/blob/master/config/routes.js

So you can decouple the frontend from other functionality, I agree eventually a job queue will be needed for scale but it's at least something for now

@Yemeni
Copy link
Collaborator

Yemeni commented Sep 17, 2020

we are going to need this too for #341 to resume quality convert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants