We have a requirement to set up custom schedules by calling a REST API and our Spring Boot services now use Spring Boot to schedule. Multiple pods should not fire multiple times based on the same schedule.
We are aware of the Kubernetes CronJob.
We think a Spring Boot Quartz scheduler with a JobStore should be sufficient to take care of pod failover etc. as the team mainly has experience with Spring Boot. JobStore can be MySql. Should mySql be in Kubernetes ? I understand quartz uses locks so that only instance can fire.
What is the view of the forum ? Our jobs are not too complicated but they may need to scale in the future.
it depends on who you want maintaining the cronjobs I guess - if you use an inside process (quartz) the developers will be in charge of the jobs running whereas if you use cronjobs - the devops team can easily check they are running/failing/taking too long.
Another thing to consider is should you be required to make a change to the job - it would be easier to change the job’s container.
That is right. Our CrojJob should push events to Kafka. Is there material I can read for this context ? I am trying to eliminate this option in favour of a Spring service.
I guess you can google event-driven +kafka and checkout articles about it - or, if you wish I would love to take a look at your design and provide some pointers.