Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recomended value for org.quartz.jobStore.clusterCheckinInterval

We are using quartz scheduler in a clustered environment (Two nodes in a cluster, pointing to a single Oracle database). Currently we have two jobs which runs pretty much every one hour.

We have a separate database schema for the quartz jobs. What we've noticed is that quartz checks the database every 15 seconds (default value for clusterCheckinInterval).

We don't like this and like to make it less frequest. What we have in mind is to give is a 1 minute frequency, but most of the example configurations has given clusterCheckinInterval as 20000.

Can some body please recommend a suitable value for the clusterCheckinInterval?

From the Quartz documentation:

org.quartz.jobStore.clusterCheckinInterval

Set the frequency (in milliseconds) at which this instance "checks-in"* with the other instances of the cluster. Affects the quickness of detecting failed instances.
like image 926
Aneesh Vijendran Avatar asked Feb 19 '13 08:02

Aneesh Vijendran


1 Answers

In a Quartz clusters the clusterCheckinInterval tells how responsive your cluster is to the failover (considering Quartz jobs). The smaller the interval is, the more quickly your application can respond. Actually this value is used by cluster nodes to check if there are recoverable jobs running on a broken node. If yes, Quartz tries to re-run them.

In general the default value is good enough, but you have to take into consideration the frequency of jobs and the effect that a missed job run can cause.

If you have a number of jobs that must run on every second, then you have to set the interval to 1000 (in milliseconds).

If you have jobs that run on every second, but it is not critical to run them all the time, then 5-15 sec is good enough (depending the fault tolerance of the system).

If you have hour-long running jobs which run a few times a day, you can raise the interval even to 60 sec.

My opinion is that I would not consider 20-30 database request per minute as a "load", so I would set it to 2 or 3 seconds (2000 or 3000 in millisec) .

like image 108
gaborsch Avatar answered Nov 15 '22 16:11

gaborsch