question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add jitter to scheduler

See original GitHub issue

Description

It would be nice if the @Scheduled annotation also support setting a jitter.

We have multiple instances running which are doing periodical tasks / checks. Adding a jitter would better distribute the load of the task randomly.

Implementation ideas

It could be added to the @Scheduled annotation similar as it is done in the @Retry annotation.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mkoubacommented, Jan 13, 2022

I must admit that I find the idea interesting. OTOH in most cases the goal of a scheduler method is to execute some logic at a specific time or at a specific interval 😉. Could you be a little more specific about the expected behavior? For example, what exactly should happen if you define @Scheduled(every = "10s", jitter = "1000")? Should it be executed somewhere between interval - 1000ms and interval + 1000ms?

CC @machi1990

0reactions
mkoubacommented, Nov 10, 2022

Note that this could be difficult (if at all possible) to implement in quarkus-quartz.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is scheduling jitter? - Stack Overflow
Jitter is a variable deviation from ideal timing event. Scheduling jitter is the delay between the time when task shall be started, and...
Read more >
Please add randomized jitter options to Cloud Scheduler ...
Having a simple way to add delay to each job makes this much simpler. Randomizing with some jitter helps avoid load spikes. Without...
Read more >
Strategy: Taming Linux Scheduler Jitter Using CPU Isolation ...
Turning off power save mode on the CPU reduced brought the max latency from 11 msec down to 8 msec. Guaranteeing threads will...
Read more >
Class JitterScheduledThreadPoolExecutorImpl - Apache HBase
ScheduledThreadPoolExecutor that will add some jitter to the RunnableScheduledFuture.getDelay. This will spread out things on a distributed cluster.
Read more >
ADG Filler #63 - Framerate Jitter? Might Be the Scheduler!
If you've ever experienced a modern game with a jittery framerate or unexplained slowdown, despite using little to no CPU power, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found