Reputation: 1
What is the benefit of using evictInBackground operation on ConnectionProvider which is used with HttpClient.create(connectionProvider) in springboot webflux ?
Upvotes: 0
Views: 2133
Reputation: 2282
By default, the connection pool timeouts (maxIdleTime, maxLifeTime etc.) are checked on connection release or acquire operations and, if some timeout is reached, the connection is closed and removed from the connection pool. However, you can also configure the connection pool, by setting evictInBackground, to perform periodic checks on connections. The configuration evictInBackground is often combined with disposeInactivePoolsInBackground to remove from the structures all inactive connection pools.
Upvotes: 3