The first line solution to consume HTTP-based services in Scala world is to use akka-http. From the three provided levels of the API, a Host-Level Client-Site API is a quite natural choice for service clients. Basically, it just provides a pool of connections to specified HTTP service. Here is an example code from akka documentation which shows how we could use akka-http to send a single request to our service:
As it is a great example of akka-http usage it could be easily overused by developers. Using this approach, we create a new flow instance each time we want to send a request. This is the cause of "Exceeded configured max-open-requests value of ..." exception if we try to spawn more parallel requests then configured the max-open-requests value. To prevent resource starvation, we can introduce Source.queue instead of Source.single. This way we can create a single flow to which we will enqueue all our requests:
I hope this will help to develop more reliable akka-http services.