From 1eea88ccb8746667b9a7f97e425644b469877668 Mon Sep 17 00:00:00 2001 From: asahi Date: Sat, 24 May 2025 16:28:27 +0800 Subject: [PATCH] =?UTF-8?q?doc:=20=E9=98=85=E8=AF=BBwebclient=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spring/webflux/webclient.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spring/webflux/webclient.md b/spring/webflux/webclient.md index cfb57bf..7507e41 100644 --- a/spring/webflux/webclient.md +++ b/spring/webflux/webclient.md @@ -131,7 +131,6 @@ HttpClient httpClient = HttpClient.create() - 其继承了`ChannelOutboundHandlerAdapter`,在通过write写入数据时,其会通过`ctx.executor()`指定一个`WriteTimeoutTask`,该task在指定timeout后被执行 - 如果在writeTimeoutTask被执行时,写操作仍然没有处理完成,那么其将会触发一个WriteTimeoutException,并且channel也会被关闭。 - 为所有请求配置response timeout: ```java HttpClient httpClient = HttpClient.create() @@ -152,6 +151,11 @@ WebClient.create().get() .bodyToMono(String.class); ``` +##### connection provider +connection provider会对`固定的最大数量连接`进行缓存和重用。其中,`最大数量`针对的是单个connection pool的最大数量,而每个connection pool则是和指定的remote host相关联。 + +当连接池中的连接都被使用时,后续连接请求将会被阻塞,阻塞时间由`pendingAcquireTime`决定。 + ### 各个超时含义 再restTemplate等阻塞api中,各个超时的含义如下所示: