title: Best way to make multiple asynchronous calls to same web service
body: <p>Application on which I am working is going to consume 2 REST web service in below sequence:</p>
  
  <p>1) Count Records - To know the numbers of records within a particular time frame.</p>
  
  <p>2) Fetch Records - Once we have number of records then we need to call this service. But this service has a threshold to fetch 10K records in a go. Lets say if first service tell me within particular time interval, it has 100K of records, then I need to call second web service 10 times in paginated way considering it's threshold is 10K in one go.</p>
  
  <p>So if I will make 10 synchronous calls, my application would be too slow to respond back. So I need to a mechanism to make asynchronous calls.</p>
  
  <p>I am using spring framework in the back end code and using rest template for web service call. I am looking to find the best way to make asynchronous call to the above mentioned POST web service</p>
  
  <p>I have done some research and found Asynchronous method useful as below:
  <a href="https://spring.io/guides/gs/async-method/" rel="nofollow">https://spring.io/guides/gs/async-method/</a></p>
  
  <p>Can you please guide me if this is a right approach what I am looking at or is their a better way to make asynchronous call? Looking for your suggestions, Thanks!</p>