Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to scale the Quartz scheduler?

I plan to use the Quartz scheduler as I read many good opinions about it.

My problem is as follows: I will have thousands of triggers living in the system at any given time. Most of the triggers will fire just one event and die. In addition, it is very likely I will have to cancel many jobs after their allocation (based on new input).

Can Quartz scale to this? Which JobStore is recommended? I planned to use the JDBC one over mysql.

Added Information: My jobs will either send an e-mail or post data via HTTP post to other services (over WAN).

like image 901
David Rabinowitz Avatar asked May 31 '09 08:05

David Rabinowitz


People also ask

Why we should not use Quartz Scheduler?

It has no built-in UI for configuration or monitoring, no useful and reasonably searchable logging or historical review, no support for multiple execution nodes, no administration interface, no alerts or notifications, not to mention buggy recovery mechanisms for failed jobs and missed jobs.

How do you trigger Quartz Scheduler?

All the Jobs registered in the Quartz Scheduler are uniquely identified by the JobKey which is composed of a name and group . You can fire the job which has a given JobKey immediately by calling triggerJob(JobKey jobKey) of your Scheduler instance. // Create a new Job JobKey jobKey = JobKey.


1 Answers

There are some tips and recommendations in the FAQ:

How many jobs is Quartz capable of running?

An excerpt from the answer:

So let me just say, there are installments of Quartz out there that are managing hundreds-of-thousands of Jobs and Triggers, and that are, at any given moment in time executing several dozens of jobs – without even utilizing Quartz’s load-balancing capabilities.

There is also some discussion in the Quartz Users forum, with experience reports from developers who have used Quartz under similar conditions.

  • Scalability & Performance - Jim Nichols is running a couple of thousand jobs clustered, and volunteers more information by e-mail
  • Quartz performance - Stey Baptiste is running 2 million jobs a day, 10 jobs a second

Update 2015-01-12: Unfortunately, the links in the list above broke when the forum was moved, and I'm unable to find new working links. I'll leave the links anyway, in case they help digging out the info from archive.org or elsewhere. The official Quartz forum is now quartz-scheduler on Google Groups.

like image 162
markusk Avatar answered Sep 24 '22 15:09

markusk