Information
We are currently in the process of creating a high availability cluster for NGINX (on Centos 7) running PHP. Most of the configuration has been mapped and it should work nicely in a clustered environment.
Unfortunately, the only thing that we cannot figure out to play nice with clustering is cron jobs (the cron jobs will execute PHP code). As far as I'm aware, cron jobs are executed on each host individually. This means that we either:
- Don't have a full high availability environment where upon single server failure, another server takes over and everything still works just as it was before (albeit slower).
- We run each cron job and save a result in a database to determine whether or not it has already been ran. This is not a viable solution as some of our cron jobs can take hours to run - and these need to be performed before the next working day.
- We find some sort of solution that enables for high availability cron jobs to be executed.
Research
Seeing as how solution 3 would help us maintain a high availability environment, that is the preferred method. Unfortunately, we are not very familiar with some of these solutions and so I seek your expertise with helping us find an appropriate solution for our needs. We are not very familiar with Linux machines (entire environment is Windows apart from NGINX servers) and know little about working with these machines (although we have been able to figure it out so far).
Options
- Dkron
- This solution seems to offer simple setup and appears to be a decent product
- Chronos
- This uses multiple other utilities to operate including an actual database (not ideal, but could work)
- Rundeck
- Seems to offer a lot of functionality and potentially the best product on this list
- Rcron
- I don't really know much about this except that it is Golang based.
- Custom script: How to make cronjobs high available?
- This is an "if all else fails" approach if nothing else works...
- Other options??? - Please provide other options if you find some and I will include them here
Questions
- What are your expert opinions or recommendations for the different options?
- What are some of your experiences using the different options (pros/cons)?
- Which options would you consider we use with our infrastructure? (if additional information about our infrastructure is needed, please let me know)
Notes
Any help regarding this is greatly appreciated.
I realize this question has been asked before, although it seems quite outdated (2011) and many new solutions have since been created.