Scheduler executes jobs x N when in cluster mode with N workers
Need to write a simple cluster mode for the scheduler to ensure that only one scheduler is ever in control in cluster mode, could be an interesting excercise re. NodeJS support for multi-cast among members of a cluster or a use of socket.io perhaps?
i am not sure i fully understand that matter at hand here. could you explain in more detail?
The scheduler runs effectively as a background task that is started as soon as the app is, when you run it in cluster mode (node app-cluster), it runs 4 servers - hence, you get four schedulers. This means any job you have configured runs 4 times. We need to change it so that when a scheduler starts, it checks if any other schedulers are running on other nodes (you do this via multicast or by holding a specific port on the server open) and if so, going to sleep.