diff --git a/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolConductor.scala b/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolConductor.scala index 7a87a9899a..be4ccb15ca 100644 --- a/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolConductor.scala +++ b/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolConductor.scala @@ -44,22 +44,22 @@ private object PoolConductor { /* Stream Setup ============ -                                            Request- - Request- +-----------+ +-----------+   Switch-   +-------------+    +-----------+  Context - Context |  retry | |  slot- |   Command  | doubler |    |  route  +--------------> - +--------->| Merge +---->| Selector +-------------->| (MapConcat) +---->|  (Flexi  +--------------> - | |  | |    | |    |  Route) +--------------> - +----+------+ +-----+-----+             +-------------+    +-----------+     to slots -   ^     ^ + Request- + Request- +-----------+ +-----------+ Switch- +-------------+ +-----------+ Context + Context | retry | | slot- | Command | doubler | | route +--------------> + +--------->| Merge +---->| Selector +-------------->| (MapConcat) +---->| (Flexi +--------------> + | | | | | | | Route) +--------------> + +----+------+ +-----+-----+ +-------------+ +-----------+ to slots + ^ ^ | | SlotEvent | +----+----+ - | | flatten | mapAsync + | | flatten | mapAsync | +----+----+ -   |     | RawSlotEvent -   | Request-    | + | | RawSlotEvent + | Request- | | Context +---------+ - +-------------+  retry |<-------- RawSlotEvent (from slotEventMerge) - |  Split  | + +-------------+ retry |<-------- RawSlotEvent (from slotEventMerge) + | Split | +---------+ */ diff --git a/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolFlow.scala b/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolFlow.scala index 457ff9b3aa..1bf95ebb42 100644 --- a/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolFlow.scala +++ b/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolFlow.scala @@ -26,28 +26,28 @@ private object PoolFlow { /* Pool Flow Stream Setup ====================== -                                  +-------------------+                              -                                      |                   |                              -                               +----> | Connection Slot 1 +---->                         -                               |      |                   |    |                         -                               |      +---+---------------+    |                         -                               |          |                    |                         -              +-----------+    |      +-------------------+    |      +---------------+ - RequestContext   |           +----+      |                   |    +----> |               | ResponseContext - +----------------> | Conductor |---------> | Connection Slot 2 +---------> | responseMerge +------------------> -              |           +----+      |                   |    +----> |               | -              +-----------+    |      +---------+---------+    |      +---------------+ -                    ^         |          |     |              |                         -                    |         |      +-------------------+    |                         -          |         |      |                   |    |                         -           RawSlotEvent |         +----> | Connection Slot 3 +---->                         -                    |                |                   |                              -                    |                +---------------+---+                              -               |    |     |     |                                     - +-----------+ RawSlotEvent |     |     |  -              | slotEvent | <-------------+     |     | -              |  Merge  | <-------------------+     |                                   -              |           | <-------------------------+                                   + +-------------------+ + | | + +----> | Connection Slot 1 +----> + | | | | + | +---+---------------+ | + | | | + +-----------+ | +-------------------+ | +---------------+ + RequestContext | +----+ | | +----> | | ResponseContext + +----------------> | Conductor |---------> | Connection Slot 2 +---------> | responseMerge +------------------> + | +----+ | | +----> | | + +-----------+ | +---------+---------+ | +---------------+ + ^ | | | | + | | +-------------------+ | + | | | | | + RawSlotEvent | +----> | Connection Slot 3 +----> + | | | + | +---------------+---+ + | | | | + +-----------+ RawSlotEvent | | | + | slotEvent | <-------------+ | | + | Merge | <-------------------+ | + | | <-------------------------+ +-----------+ Conductor: diff --git a/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolSlot.scala b/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolSlot.scala index b1b855d689..b712f17b6d 100644 --- a/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolSlot.scala +++ b/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolSlot.scala @@ -37,15 +37,15 @@ private object PoolSlot { Stream Setup ============ - Request-  +-----------+  +-------------+  +-------------+    +------------+ - Context  | Slot-     |  List[ | flatten | Processor-  | doubler |    | SlotEvent- |  Response- - +--------->| Processor +------------->| (MapConcat) +------------->| (MapConcat) +---->| Split      +-------------> -           |           |  Processor- | | Out  | |    |            |  Context -           +-----------+  Out] +-------------+ +-------------+    +-----+------+ -                          | RawSlotEvent -                  | (to Conductor + Request- +-----------+ +-------------+ +-------------+ +------------+ + Context | Slot- | List[ | flatten | Processor- | doubler | | SlotEvent- | Response- + +--------->| Processor +------------->| (MapConcat) +------------->| (MapConcat) +---->| Split +-------------> + | | Processor- | | Out | | | | Context + +-----------+ Out] +-------------+ +-------------+ +-----+------+ + | RawSlotEvent + | (to Conductor | via slotEventMerge) -                              v + v */ def apply(slotIx: Int, connectionFlow: Flow[HttpRequest, HttpResponse, Any], settings: ConnectionPoolSettings)(implicit system: ActorSystem,