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

Provide connection pool usage statistics for PoolingClientConnectionManager

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • HttpClient (classic)
    • None

    Description

      For clients that have high request rate to their corresponding services, it is critical that the client has an efficient connection pool and reuse free connections as often as possible, and is free from bugs like not releasing resources from http response that causes low reuse of connections and timed out waiting for connection. To meet that requirement, the developers need to have insight of current state of the connection pool.

      Connection pool, like any object pool or cache, needs to have statistics for fine tuning, like Guava CacheBuilder that provides statics for cache hit ratio and many others.

      It will be very beneficial if the PoolingClientConnectionManager provides following statistics:

      • count of occurrences that a free entry is obtained when requesting a connection
      • count of occurrences that a new entry is created
      • count of occurrences that an entry is released
      • count of occurrences that an entry is deleted

      I was able to provide such statistics for the deprecated ThreadSafeClientConnManager in Ribbon:

      https://github.com/Netflix/ribbon/pull/47

      But it seems that PoolingClientConnectionManager does not provide such hooks.

      Attachments

        Activity

          People

            Unassigned Unassigned
            allenxwang Allen Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: