Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The defaults values in the tasks-config.xml are chosen in a way, for the user to do minimal changes when running in both standalone and clustered modes. The task server mode is set to "AUTO" by default, which automatically detects if clustering is enabled in the server, and it by default switches to clustered mode of scheduled tasks. The task server count is set to "2" by default, where in a clustered setup, at least two nodes will be there. This setting basically represents the number of servers, who will be waiting for scheduled tasks to be shared between the given number of nodes at the startup. For example, if 10 tasks were saved and scheduled earlier, for some reason, later if they cluster was brought down, and then again, when individual servers are coming up, we do not want the first server up to schedule all the tasks, rather we will want several servers to come up and share the 10 tasks between them.

Info

Note: The task clustering is based on a peer-to-peer communication mechanism, and when carrying out the fail-over scenarios, it can rarely result in split-brain scenarios, where the same task can be scheduled without knowing it is already scheduled somewhere else. So the task implementors should make their best effort to make the task functionality idempotent, or come up with a mechanism to detect if the current task is already running elsewhere.  

...