Cluster Scheduler

Our application (Spring) contains several Schedulersthat become active during the night to change / update some data (from Database) to Batch.

Everything works fine, the problem is that our application will be launched soon clustered environment.

What are the best options for preventing both schedulerfrom instance Aand from instance Bdoing the same job at the same time?

** UPDATE ** The
clustered environment is configured as 'active-active'.
Each node contacts it with its own database instance. Each database instance will transfer data replicateto other instances.
DB instances are not configured as 'master-slave', but will be executed in Galera cluster, where each instance performs insert-update-delete operations.

Thus, each schedulershould only be run once on a single instance. Other instances should not be run by schedulers. Therefore, I need to find a way to start the Scheduler of one instance, the same schedulers of other instances should not start.

+4
source share
4

: Quartz job scheduling.
Quartz scheduling Spring.

+4

. ?

, .

Zookeeper .

+1

. .

  • . , , . .
  • . , , . jms /.

- .

+1

, Schedulers .
, , - . JEE , Quartz . Spring , Quartz, .

With persistent schedulers, jobs are added to the database, and triggers run in "transactions" (not sure if this is the actual transaction), ensuring that only one scheduler can trigger the trigger.
However, this requires several database tables.

+1
source

All Articles