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

Why is it recommended that background workers run on the web server? #555

Open
davidharting opened this issue Apr 18, 2020 · 0 comments
Open

Comments

@davidharting
Copy link

davidharting commented Apr 18, 2020

This issue is related to the documentation on background workers.

I am opening this issue hoping to learn more about the last two sentences:

The buffalo.App#Serve method will, by default, call the worker.Worker#Start method for the registered worker. This will also call the worker.Worker#Stop method when the application is shut down. This is the recommended approach for applications.

This text is clear to me, but I would love to know the reasons for the recommendation.

This would particularly enhance the documentation, because I believe this recommendation may violate many readers expectations. For myself, I was surprised that it was not recommended to run workers on a separate node as I assumed it would be generally better to leave as much compute as possible for serving web traffic.

I am not questioning the recommendation or suggesting it be changed, but am simply eager to learn the motivation for the recommendation.


Attachments

I have attached a screenshot of the quoted portion of the docs.

Screen Shot 2020-04-18 at 6 45 04 PM

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

1 participant