I am adding a new endpoint to a Jersey-based web-service. The logic backing the endpoint needs to make between 10 to 50 calls to another service. The calls are independent and can be parallelized, so I was thinking of using executor service to distribute the work across multiple threads.
I am wondering if I should instantiate an executorService for each request or should there be a shared executorService instance across the webapp. In the later case, how would I decide the number of threads it should run?