Uploaded image for project: 'JBoss ESB'
  1. JBoss ESB
  2. JBESB-3356

maxThreads does not adequately propagate to HttpClient in HttpRouter, SOAPClient and SOAPProxy

    Details

    • Estimated Difficulty:
      Low

      Description

      First, some background:

      If one is trying to set the maxThreads for INVM invocation of a Service (where invmScope="GLOBAL"), then one would do it like so:
      <service .... invmScope="GLOBAL">
      <property name="maxThreads" value="#"/>
      ....

      If one is trying to set the maxThreads for an ESB aware Listener's invocation of a Service, then one would do it like so:
      <service ...>
      <listeners>
      <xxx-listener ...>
      <property name="maxThreads" value="#"/>

      In each of these cases, an action can look for the maxThreads via it's passed in ConfigTree's parent:
      config.getParent().getAttribute(ListenerTagNames.MAX_THREADS_TAG).

      The HttpRouter takes advantage of this and defaults the max-total-connections property it hands to HttpClient to the value of the parent ConfigTree's maxThreads.

      Now, the problems:

      1) HttpRouter only defaults HttpClient's max-total-connections property to the value of maxThreads. It should also default max-connections-per-host.

      2) SOAPClient similarly only defaults HttpClient's max-total-connections property to the value of maxThreads. It should also default max-connections-per-host.

      3) The SOAPProxy class "HttpSOAPProxyTransport" wraps HttpRouter, and creates it with a ConfigTree. However, this ConfigTree is a clone of the ConfigTree passed into the SOAPProxy, which does not have a parent ConfigTree. Thus, there is no parent to get the maxThreads from. Because of that, if someone wants to set the max-total-connections and max-connections-per-host, one has to do this:

      <action class="...SOAPProxy" ...>
      ...
      <property name="http-client-properties">
      <http-client-property name="max-total-connections" value="#"/>
      <http-client-property name="max-connections-per-host" value="#"/>
      </property>

      or this:

      <action class="...SOAPProxy" ...>
      ...
      <property name="file" value="/file-containing-those-props.properties>

      In problems 1 and 2, the user needs to know to set the "max-connections-per-host" property. In problem 3, the user needs to know to set both the "max-total-connections" and "max-connections-per-host" properties. If the user doesn't know to do this, they might wonder "why am I getting such bad out-of-the-box performance?"

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dward David Ward
                  Reporter:
                  dward David Ward
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: