On Thursday, January 21, 2016 at 11:57:53 PM UTC+2, rel games wrote: > > I am trying to build a service which needs to access external HTTP service. > I use Akka HTTP Server DSL, and HTTP handlers in turn use Client API. > Akka 2.4.0 and Akka HTTP 2.0.2 > > I asked same question on SO twice: > > http://stackoverflow.com/questions/34293113/how-to-properly-call-akka-http-client-for-multiple-10k-100k-requests/ > > > http://stackoverflow.com/questions/34808752/how-to-properly-call-a-single-server-from-multiple-actors-web-handlers-using-a/ > > Got suggestions to use a single Stream and also to > try cachedHostConnectionPool. > First option is not possible because HTTP Client API should be called from > different places (so, I'm trying to write some kind of a filtering proxy), > and second did not work. > I have found a way to do it though: using low-level outgoingConnection API. > > Here is what I tried: > https://gist.github.com/relgames/c511662a906053fe132a > TestMaxRequests1 (which uses low-level API) works while TestMaxRequests2 > fails with Exceeded configured max-open-requests value of [2] > > I can continue to use low-level API but I think I will need to implement > my own connection pooling, which seems strange as cachedHostConnectionPool > is supposed to do it. > Why doesn't cachedHostConnectionPool work? Is there a bug? Do I use it > wrong? > > see http://doc.akka.io/docs/akka/2.4.3/scala/http/configuration.html#akka-http-configuration
you can increase max-open-requests to allow more pending open requests. and max-connections to set more than 2 concurrent open connections. -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
