We have a scenario that we need to check after some interval that whether all the results are completed/processed in db against a particular id or not, and if it is then we need to make a file and send it to some bucket.
This logic is written in spring application. Now the problem is I have a concern that once we deploy that application to cloud than if there are 10 instances running of an application then there is a chance that the file could be placed multiple times on the bucket.
I don't want to implement something outside of an application (but open to any suggestion if it's not possible). May be using some db flags could help but I think that is not right or messy as all instances would be processing something before checking at the end that the file is already processed.
Please let me know on this. Thanks!
P.S. I am using GCP as cloud provider.
Aucun commentaire:
Enregistrer un commentaire