Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-2180

Pre-init minimum number of connections

    XMLWordPrintableJSON

Details

    Description

      Most of the applications suffer from a problem of cold start where we don't have connections created at the start of the application and thus the first few requests suffer by making a lot of connections.

      During deployment this can even pile up a lot of not completed request and may lead to losses.

      One suggestion I had in mind is to create few connections before the application has begun from the intended endpoints.

      Also sometimes the nautre of your traffic can be spiky in which scenario opening and closing a lot of connections also doesn't make sense.

       

      These can be solved with either or both of the suggestions:

      1. Have a minConnectionPerHost policy in connection pool which won't let connection pool for a host to go below this number or make a new connection when it does. At the start of the http client these minimum connections will be created to the end services.
      2. Provide an easy mechanism for use to create connections via ConnectionManager. Currently in PoolingAsyncConnectionManager one must give ConnectionInitiator which make it difficult to directly use the connection manager to create connections.

      Attachments

        Activity

          People

            Unassigned Unassigned
            anuragagarwal56 Anurag Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: