make a GET call 100,000 times : <p>I have a requirement where I am writing a small utility to test apis(ofcourse there are existing tools but it has been decided to write one). I am required to bombard the api, for the same api call, with say 100 threads, around say 100,000 times.</p>

<p>I am using 'PoolingHttpClientConnectionManager' for the making the calls. I am using something as mentioned in the below link:</p>

<p><a href="https://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html" rel="nofollow">https://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html</a></p>

<p>My question is:</p>

<p>(1) How can I run the above code for 100,000 iterations? Using that many number of threads is obviously a bad idea. Initially thought of using ExecutorService for maintaining thread count and number of jobs to be submitted but it felt redundant.</p>

<p>(2)I read about 'setMaxTotal'(max connections) and 'setDefaultMaxPerRoute'(concurrent connections) but I dont think it will help achieve(1) though I will obviously be required to increase the values.  </p>

<p>Please advise. Thanks in advance.</p>
