-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage in clustered environment #45
Comments
@gitkeerthi Clustering is not supported within the library, but a persistent job store can be implemented independently. |
Maybe a simple global system like etcd , kine or nats would be a simple global locking store . let’s use NATS because it has subscriptions which is handy. so the 3 events are: When a job starts it registers with NATS , so no other servers take the job. on job start , check with NATS and if not in nats, run the job. On job finish , unregister with nats —- you can embed nats servers in your project too which is handy . Nats will automatically do leader election so if a server fails and new leader is automatically chosen . —- I don’t know if Quartz has job lease time and retries , but the above can probably work with the above design . Btw thos already exists and uses nats for job locking as well as other aspects : https://github.com/choria-io/asyncjobs it also has a schedular: https://choria-io.github.io/asyncjobs/overview/scheduled-tasks/ in their code it’s used cron golang module. maybe there is opportunity to use Quarz but not sure yet. |
please have planing for support cluster |
@gitkeerthi, @gedw99, @bingtianyiyan I've opened a pull request (#80) to support custom job queue implementation that can provide persistent storage and state sharing for jobs. Please review, and let me know if this satisfies your requirement. |
You mean that we can create multiple instances of |
By implementing a shared persistence layer, you can enable multiple scheduler instances to retrieve and process jobs. This architecture supports high availability (HA) scenarios and facilitates scalability when job processing becomes highly competitive. |
How do you use this in a clustered environment where more than one instance of the scheduler might exist? Is there a feature similar to quartz cluster mode (https://flylib.com/books/en/2.65.1/how_clustering_works_in_quartz.html)?
The text was updated successfully, but these errors were encountered: