Search code examples
javaspringspring-bootconnection-poolinghttpconnection

HTTP connection pool utilization check


In my spring-boot 2.1 app I have set up PoolingHttpClientConnectionManager with 100 connections max.

Is there a way to know how many HTTP connections are utilized in HTTP connection pool?


Solution

  • PoolingHttpClientConnectionManager implements org.apache.http.pool.ConnPoolControl that has getStats and getTotalStats methods. Use them.