Scheduler API & Implementation for multi site architecture

Hi All,

We have a need for scheduler micro service as an API. We also have multi site architecture so one scheduler service can have multiple instance in one site + every site can have multiple instances. All instances in one site share the DB (NoSQL). These microservice instances can go up or down as required.

How can I make it safe so that same job trigger is not being processed by multiple instances?

For example Site A receive a POST required for a schedule 19 Oct 2016 10:30 AM & it is to trigger a HTTP request. The schedule is then stored in DB.

Scheduler is reading from DB every 5 minutes to check if there are any new jobs or change in schedule.

Site A has 5 instances of micro service running so all 5 would have this schedule registered. Also Site B instances got this schedule using DB sync & they also got this registered. At 10:30 AM, 10 scheduler instances would try to run the job schedule and send 10 http requests.

How to prevent this multiple triggers?

1 0 355
0 REPLIES 0