Uploaded image for project: 'Mule'
  1. Mule
  2. MULE-19072

HTTP Client should use a custom scheduler to stream responses

    XMLWordPrintable

Details

    • S1
    • No
    • Production Defect
    • 0
    • Prod Eng - U2 12/16
    • S1
    • performance
    • Hide

      Fixed a deadlock when streaming responses in proxy scenarios by using a dedicated thread-pool.

      Show
      Fixed a deadlock when streaming responses in proxy scenarios by using a dedicated thread-pool.

    Description

      When streaming responses, the HTTP client uses a PipedInputStream/PipedOuputStream to write the body parts read from the socket, and it's currently doing this operation in an IO scheduler.

      These kind of streams are being read usually schedulers using threads from the same pool (the uber).

      So, it's possible to be using the same thread-pool (and therefore the same thread) to read/write from/to the same pipe. If it happens, we have a deadlock.

      To avoid this situation, we should use a custom scheduler to handle the response parts and write them to the pipes.

      Attachments

        Issue Links

          Activity

            People

              ewerner@mulesoft.com Ezequiel Maximiliano Werner
              ewerner@mulesoft.com Ezequiel Maximiliano Werner
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                SLAEndDate: