title: How to refresh request token with microservice multiple instances
body: <p><strong>Scenario:</strong></p>
  
  <p>When the request token expires and multiple requests happen from different service instances, that all request a new request token via the remote HTTP call, at the same time, the latter request token will make the former request token invalid. Because each request to get a new token will make the previous one invalid. The service to generate request token is a third party one, we can't change it.</p>
  
  <p><strong>Questions:</strong></p>
  
  <ol>
  <li><p>Our application architecture is microservice based, each service will have multiple instances, how can I reuse the request token between each service?(maybe store it in an external Redis is an option)</p></li>
  <li><p>During the service starting up, how can we make sure only one refresh token request sent to the third party service?</p></li>
  <li><p>Afterwards, when the request token expires, how can we renew it?</p></li>
  </ol>
  
  <p><strong>Tech Stack:</strong></p>
  
  <ul>
  <li>Java 8</li>
  <li>SpringCloud</li>
  <li>Redis</li>
  <li>Rancher</li>
  <li>MySQL</li>
  </ul>