Current situation:
- at time T1, instance A loads the S3 token
- at time T2, instance B loads the S3 token
- instance B refreshes the token, stores it back to S3
- later, instance A also refreshes the token, and writes it back as well, thereby overwriting a perfectly valid token stored by instance B
Instead, instance A should check that the Last-Modified value of the stored token is still the one it has seen when loading in T1. At least, it should internally store the new Last-Modified value, to compare it again when the next refresh happens.
Current situation:
Instead, instance A should check that the
Last-Modifiedvalue of the stored token is still the one it has seen when loading in T1. At least, it should internally store the newLast-Modifiedvalue, to compare it again when the next refresh happens.