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

Worker Deployment #2043

Open
wpank opened this issue Oct 18, 2022 · 0 comments
Open

Worker Deployment #2043

wpank opened this issue Oct 18, 2022 · 0 comments

Comments

@wpank
Copy link
Contributor

wpank commented Oct 18, 2022

Similar to #2040 (read that first).

The worker package is where any work gets separated out into related to querying, computing, aggregating, etc. Basically all the current cron jobs that exist in the backend/core are to be separated out into the worker package.

BullMQ is mainly used as a message queue to facilitate communication between various services. There exists jobs (things to be done), queues (the list of jobs), and workers (the things to pick a job off the queue and execute them). BullMQ uses Redis underneath, thus #2042 is needed first.

Containerized workers are meant to be run in parallel, and scaled as needed. They will need a mongodb connection and redis connection. A worker will listen for jobs from the queue and pick only one off (so if multiple workers are running, a job will be run only once, by only one worker). Thus, the backend could be scaled more by spinning up more worker pods as necessary.

There will need to be a otv-worker docker repo created - the build and publish ci pipelines already exist for this.

In terms of deployment, there will need to be charts and helmfile created. Considerations would be:

  • Horizontal Pod Autoscaling - perhaps above a certain cpu usage new pods get created
  • workers will need a mongodb and redis connection
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