Project Reactor - ConnectionProvider.evictInBackground()

Viewed 23

What is the benefit of using evictInBackground operation on ConnectionProvider which is used with HttpClient.create(connectionProvider) in springboot webflux ?

1 Answers

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.

Related