Java / Scala multithreading issue for web service

In a web service environment, I want to make several independent HTTP calls for every request that my application receives. Since these calls are independent, it makes no sense to make them in series, so I need a kind of concurrency.

As far as I understand, it makes no sense to casually create new streams for each HTTP call. And also, recreating all these flows brings a lot of overhead.

So, I think the best option would be to create a FixedThreadPool in singleton for all HTTP calls and use this application.

Is this the best choice?

+3
source share
2 answers

Akka, , .

+4

, AsyncHttpClient AsyncHttpClient HTTP-. , , , AsyncHttpClient

+3

Source: https://habr.com/ru/post/1787101/


All Articles