Skip to content

fix(worker): keep worker health checks alive while idle in push mode#683

Merged
lvthanh03 merged 1 commit into
mainfrom
tony/fix-healthcheck-push-mode
Jun 8, 2026
Merged

fix(worker): keep worker health checks alive while idle in push mode#683
lvthanh03 merged 1 commit into
mainfrom
tony/fix-healthcheck-push-mode

Conversation

@lvthanh03

@lvthanh03 lvthanh03 commented Jun 8, 2026

Copy link
Copy Markdown
Member

Refs STREAM-1056

Fixes push-mode worker health checks so low-throughput or idle workers continue touching the health check file.

Previously, push mode only emitted the health check from update_task, which only runs after a task result is sent. Unlike pull mode, idle push workers had no predictable heartbeat and could be killed despite being healthy.

@lvthanh03 lvthanh03 requested a review from a team as a code owner June 8, 2026 14:45
@linear-code

linear-code Bot commented Jun 8, 2026

Copy link
Copy Markdown

STREAM-1056

@evanh evanh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

@george-sentry george-sentry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should do a quick test to make sure this doesn't significantly impact performance, but otherwise looks good!

@lvthanh03

Copy link
Copy Markdown
Member Author

We should do a quick test to make sure this doesn't significantly impact performance, but otherwise looks good!

Tested on 1 broker, 22 workers (32 processes/worker) and example task which takes 100ms, we are processsing 6.9k tasks/s on a theoretical limit of 7,040 tasks/s, so on this configuration there is no impact of the healthcheck thread on the workers.

The healthcheck file now also updates even when there are no tasks / worker is idle.

@lvthanh03 lvthanh03 merged commit 0b13bea into main Jun 8, 2026
26 checks passed
@lvthanh03 lvthanh03 deleted the tony/fix-healthcheck-push-mode branch June 8, 2026 20:07
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

Successfully merging this pull request may close these issues.

3 participants