'how can I properly separate the processing of records from the database in multi replica mode the same application(spring)?
I have a Spring Boot 2.2.x backend deployed in kubernetes. I want to split a workload in this backend by the number of replicas of this application. If I have one instance, the range of data (which comes from an external API) must not be split at all. If I have two instances, the first replica must work on the first half of the data and the second replica must work on the other half, and so on.
What is the better way of manage this kind of issue ? Is there a spring library available to dynamically detect the number of instances and partition the data ? I already have a redis avaiblable, I think I can store some useful information in it.
Thanks for you thoughts.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
