pool icon indicating copy to clipboard operation
pool copied to clipboard

连接池中连接管理与使用的问题

Open ilabtop opened this issue 3 years ago • 1 comments

连接池初始化时定义了MaxActive和MaxConcurrentStream,当达到MaxActive及MaxConcurrentStream时,若连接池reuse=true,那么还会使用Round-Robin算法选择已创建的连接进行数据传输,这个不是对已定义的MaxConcurrentStream矛盾了吗?是否应该追踪每一个线程的连接使用状态?

ilabtop avatar Oct 16 '22 13:10 ilabtop

reuse如果为false的话,看起来是创建了一次性conn,用完之后会close掉。如果reuse为true,那么会从已创建的conn里选出一个,即使它已经达到了MaxCurrentStream

LugiaChang avatar Dec 27 '22 09:12 LugiaChang