Skip to content

feat: Add taskbroker + worker + scheduler #3738

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

Merged
merged 4 commits into from
Jun 11, 2025
Merged

Conversation

markstory
Copy link
Member

@markstory markstory commented Jun 6, 2025

Add a taskbroker, scheduler and worker pod. While these pods aren't doing much right now, in a subsequent release they will and the cron/worker containers will be removed/replaced by these new containers.

Refs getsentry/taskbroker#267

TODO

  • Get dockerhub repository created
  • Validate image publishing to dockerhub.

Add a taskbroker, scheduler and worker pod. While these pods aren't
doing much right now, in a subsequent release they will and the
cron/worker containers will be removed/replaced by these new containers.

Refs getsentry/taskbroker#267
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.45%. Comparing base (e684c7e) to head (ce4bff8).
Report is 2 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3738   +/-   ##
=======================================
  Coverage   99.45%   99.45%           
=======================================
  Files           3        3           
  Lines         183      183           
=======================================
  Hits          182      182           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +559 to +561
# This volume stores task data that is inflight
# It should persist across restarts. If this volume is
# deleted, up to ~2048 tasks will be lost.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This begs a question. If the volume if deleted, then how should one recover 2048 lost tasks?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You would have to reset offsets in Kafka.

Comment on lines +502 to +504
taskworker:
<<: *sentry_defaults
command: run taskworker --concurrency=4 --rpc-host=taskbroker:50051 --num-brokers=1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this concurrency=4 coming from?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I mean, why does it has to be exactly 4?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't have to be 4. In saas, we typically run either 16 or 32 concurrent workers. If left undefined the default is 1 which is will limit throughput of a self-hosted install as tasks are used extensively in ingest. 4 felt like a decent balance of providing more processing power without consuming a ton of memory.

Comment on lines 492 to 493
ports:
- "$SENTRY_BIND:50051/tcp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must not be exposed.

Suggested change
ports:
- "$SENTRY_BIND:50051/tcp"

@markstory markstory marked this pull request as ready for review June 11, 2025 14:31
@aldy505 aldy505 merged commit c8ee02d into master Jun 11, 2025
11 checks passed
@aldy505 aldy505 deleted the feat-add-taskbroker branch June 11, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants