=doc #17591 add note that long running requests may block connections

This commit is contained in:
Johannes Rudolph 2015-07-21 14:25:07 +02:00
parent 62a43d27bb
commit 414a26a85e
4 changed files with 16 additions and 0 deletions

View file

@ -80,6 +80,10 @@ response with its respective request. The way that this is done is by allowing t
This context object of type ``T`` is completely opaque to Akka HTTP, i.e. you can pick whatever works best for your
particular application scenario.
.. note::
A consequence of using a pool is that long-running requests block a connection while running and may starve other
requests. Make sure not to use a connection pool for long-running requests like long-polling GET requests.
Use the :ref:`connection-level-api-java` instead.
Connection Allocation Logic
---------------------------

View file

@ -7,6 +7,10 @@ The request-level API is the most convenient way of using Akka HTTP's client-sid
:ref:`host-level-api-java` to provide you with a simple and easy-to-use way of retrieving HTTP responses from remote servers.
Depending on your preference you can pick the flow-based or the future-based variant.
.. note::
The request-level API is implemented on top of a connection pool that is shared inside the ActorSystem. A consequence of
using a pool is that long-running requests block a connection while running and starve other requests. Make sure not to use
the request-level API for long-running requests like long-polling GET requests. Use the :ref:`connection-level-api-java` instead.
Flow-Based Variant
------------------