0

I have a design question Cron job scheduled in spring app using @scheduled, I have 4 instances and I want the job to run in all the instances by distributing data. Say I need to process 1000 data, each instance should process 250 data. Any idea how this can be achieved. Instances are using kubernetes pod

Tried locking the data row level but this might not be a good approach

1 Answer 1

0

We had just the same issue and solved it by the solution described in https://vladmihalcea.com/database-job-queue-skip-locked/.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.