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

feat: scheduler init jitter #6071

Merged
merged 5 commits into from
Jan 30, 2024
Merged

feat: scheduler init jitter #6071

merged 5 commits into from
Jan 30, 2024

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Jan 30, 2024

About the changes

Adding scheduler init jitter to avoid too many DB operations running at once. Subsequent runs are not affected.

Design decisions:

  • default jitter calculated so that we don't need to change code using scheduler
  • default jitter is 2s-30s
  • if any scheduler runs more often than max jitter time (30 seconds) then no jitter is applied
  • you can explicitly opt-out of jitter by passing 0ms jitter

Important files

Discussion points

Copy link

vercel bot commented Jan 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2024 2:44pm
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2024 2:44pm

Copy link
Contributor

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

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

LGTM! Let's try it out!

@kwasniew kwasniew merged commit ccc41dc into main Jan 30, 2024
6 checks passed
@kwasniew kwasniew deleted the scheduler-init-jitter branch January 30, 2024 14:49
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.

None yet

2 participants