[Reactor Netty] WebClient connection pool?
ITWeb/개발일반 2020. 3. 20. 19:12RestTemplate 을 사용 할 까 하다, WebClient 로 변경 했습니다.
더불어 늘 Connection Pool 에 대한 고민을 하는데요.
https://projectreactor.io/docs/netty/snapshot/reference/index.html#_connection_pool
By default, the TCP client uses a “fixed” connection pool with 500
as the maximum number of the channels,
45s as the pending acquire timeout and 1000 as the maximum number of
the registered requests for acquire to keep in the pending queue.
This means that the implementation creates a new channel
if someone tries to acquire a channel but none is in the pool.
When the maximum number of the channels in the pool is reached,
new tries to acquire a channel are delayed
until a channel is returned to the pool again.
The implementation uses FIFO order for channels in the pool.
By default, there is no idle time specified for the channels in the pool.
Channel 500개
Queue 1000개
그냥 신경쓰지 말고 쓰라고 합니다.